function complete_profile_form in Complete profile 7
1 string reference to 'complete_profile_form'
- complete_profile_menu in ./
complete_profile.module - Implements hook_menu().
File
- ./
complete_profile.pages.inc, line 3
Code
function complete_profile_form($form, &$form_state, $account) {
$form['help'] = array(
'#markup' => '<p>' . t('Fill out the following fields to complete your profile.') . '</p>',
'#weight' => -100,
);
$controllers = profile_complete_get_controllers();
foreach ($controllers as $controller) {
$result = $controller::getFieldsForm($account, $form_state);
$form = drupal_array_merge_deep($form, $result);
}
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
//$form['actions']['logoff'] = array(
// '#type' => 'link',
// '#title' => t('Log out'),
// '#href' => 'user/logout',
//);
// Track which fields are visible now, so that we can hide any extra fields
// that are pre-rendered in.
//$form['#visible_elements'] = array_merge(element_get_visible_children($form), array('form_build_id', 'form_token', 'form_id'));
//array_unshift($form['#pre_render'], 'complete_profile_hide_fields');
return $form;
}