我有一个模块,我想用它来显示Drupal 7的默认表单之一的修改版本。我认为表单ID是user_profile_form
,它是用于编辑用户帐户信息的表单。
所以这是我模块的结构:
user_exe_edit()
- > user_exe_edit()
来电drupal_get_form(input_simple_form)
- > input_simple_form($form, &$form_submit)
现在我需要函数input_simple_form
来返回ID为user_profile_form
的Drupal表单。
我该怎么做?
答案 0 :(得分:0)
您不需要input_simple_form(),但是您需要包含用户模块的页面:
global $user;
// if the user is logged in, otherwise anonymous users will see it
if ($user->uid > 0) {
module_load_include('inc', 'user', 'user.pages');
return user_edit($user);
}