如何在drupal 7中包含/调用profile2注册表单

时间:2012-07-06 09:06:57

标签: drupal-7

我创建了另一个个人资料学生,并添加了一个名为class的字段。我想显示这个表格,包括提交的类。

如何显示学生注册表..请帮忙

1 个答案:

答案 0 :(得分:0)

我在块

中使用了以下代码
<?php
     print drupal_render(drupal_get_form('user_register_form'));
$profile = profile2_load_by_user($account);
print drupal_render(field_view_field('profile2', $profile['Student'], 'field_class'));
?>