My default user profile form is a multistep. The problem is when user want to update only fields from “My Address”. I would like to create a link from user profile page to form with the address fields only.
I would be great if you can provide example using hook_menu and separate page.
PS. I do not use Profile2 module. My custom profile fields are created using Drupal only.
My code:
$ items['user/%user/edit-custom'] = array( 'title' => 'Edit custom', 'page callback' => 'drupal_get_form', 'page arguments' => array('user_profile_form_custom', 1), 'access callback' => 'user_edit_access', 'access arguments' => array(1), 'type' => MENU_LOCAL_TASK, ); function user_profile_form_custom($ form, &$ form_state) { $ account = user_load(arg(1)); module_load_include('inc', 'user', 'user.pages'); drupal_set_title(check_plain($ account->name)); return drupal_get_form('user_profile_form', $ account, 'account'); }
However I don’t want include the user_profile_form due to some validation processes.