function form_test_form_user_register_form_alter

Implements hook_form_FORM_ID_alter() for the registration form.

File

drupal/modules/simpletest/tests/form_test.module, line 1887
Helper module for the form API tests.

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);
  }
}