我怎样才能看到注册页面上的个人资料字段?

发布于 2024-08-31 07:09:41 字数 388 浏览 2 评论 0原文

我制作了定制的用户注册页面。我已经在主题层上做了这个。
但现在我想查看我在配置文件模块中创建的字段。
正如我这样写的,

<?php print drupal_render($form['account']['name']); ?>

这段代码将显示用户名字段。这是默认的。现在我想查看我在配置文件模块上创建的配置文件字段。
那么谁能告诉我我必须在 drupal_render[?] 中写什么?
提前致谢。


Nitish
Panchjanya Corporation

I have made customized user registration page. and i have made that on theme layer.
But now i want to see the the fields which i have made in profile module.
as i have written like this for

<?php print drupal_render($form['account']['name']); ?>

this code will show the user name field. which is default. now i want to see the profile fields which i have created on the profile module.
So can any one tell me what i have to write in drupal_render[?]?

Thanks in advance.


Nitish
Panchjanya Corporation

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

零時差 2024-09-07 07:09:41

首先,如果您使用 Drupal 6,您可能想知道您可以只选择一个复选框,出现在注册页面,当您从管理 UI 创建新的用户配置文件字段时,该复选框会显示。

否则你可以试试这个。

$categories = profile_categories();
foreach($categories as $category) {
  $result = _profile_get_fields($category['name']);
  # You can add code here to render each category seperately #
  while($field = db_result($result)) {
    $fieldname = $field['name'];
    drupal_render($form[$category][$fieldname]);
  }
}

First, if you are using Drupal 6, you might want to know that you can just choose a checkbox, Appear in Registration page which shows up when you are creating a new user profile field from the Admin UI.

Else you can try this.

$categories = profile_categories();
foreach($categories as $category) {
  $result = _profile_get_fields($category['name']);
  # You can add code here to render each category seperately #
  while($field = db_result($result)) {
    $fieldname = $field['name'];
    drupal_render($form[$category][$fieldname]);
  }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文