[英]Drupal - (Profile2) Profile types does not show form on multistep wizard
I have created multistep registration form with multistep registration module and profile2 module. 我用多步注册模块和profile2模块创建了多步注册表单。
Steps: 脚步:
I would like the user to enter contact info on step 2, and pre-populate it on step 3. 我希望用户在步骤2中输入联系信息,并在步骤3中预先填充。
I made custom module and used: 我制作了自定义模块并使用:
function fs_prepopulate_form_alter(&$form, &$form_state, $form_id) {
}
I am trying to use var_dump($form);
我正在尝试使用var_dump($form);
on step 2 and step 3 but it does not show any form fields. 在第2步和第3步上,但是它不显示任何表单字段。
After working few days on this issue, I finally got the solution. 在这个问题上工作了几天后,我终于找到了解决方案。 I used hook_form_profile2_form_alter instead of using hook_form_alter to get the profile2 form fields.Here is the link for profile2 reference help http://api.drupalhelp.net/api/profile2/profile2.module . 我使用hook_form_profile2_form_alter而不是hook_form_alter来获取profile2表单字段。这里是profile2参考帮助的链接http://api.drupalhelp.net/api/profile2/profile2.module 。 I hope this information would save someone's time. 我希望这些信息可以节省别人的时间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.