function form_test_form_user_register_form_alter
Same name in other branches
- 9 core/modules/system/tests/modules/form_test/form_test.module \form_test_form_user_register_form_alter()
- 8.9.x core/modules/system/tests/modules/form_test/form_test.module \form_test_form_user_register_form_alter()
- 10 core/modules/system/tests/modules/form_test/form_test.module \form_test_form_user_register_form_alter()
- 11.x core/modules/system/tests/modules/form_test/form_test.module \form_test_form_user_register_form_alter()
Implements hook_form_FORM_ID_alter() for the registration form.
File
-
modules/
simpletest/ tests/ form_test.module, line 1897
Code
function form_test_form_user_register_form_alter(&$form, &$form_state) {
$form['test_rebuild'] = array(
'#type' => 'submit',
'#value' => t('Rebuild'),
'#submit' => array(
'form_test_user_register_form_rebuild',
),
);
// If requested, add the test field by attaching the node page form.
if (!empty($_REQUEST['field'])) {
$node = (object) array(
'type' => 'page',
);
field_attach_form('node', $node, $form, $form_state);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.