I have a module that I want to use to display a modified version of one of Drupal 7's default forms. I believe the form ID is user_profile_form
and it is the form used to edit a user's account information.
So this is the structure of my module:
user_exe_edit()
-->user_exe_edit()
calls drupal_get_form(input_simple_form)
-->input_simple_form($form, &$form_submit)
Now I need the function input_simple_form
to return the Drupal form with id user_profile_form
.
How do I do that?
You won't need your input_simple_form(), but you will need to include the user module's pages:
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);
}