1 form_test.module form_test_email($form, &$form_state)

Form constructor for testing #type 'email' elements.

See also

form_test_email_submit()

Related topics

File

core/modules/simpletest/tests/form_test.module, line 1766
Helper module for the Form API tests.

Code

function form_test_email($form, &$form_state) {
  $form['email'] = array(
    '#type' => 'email',
    '#title' => 'Email address',
    '#description' => 'An email address.',
  );
  $form['email_required'] = array(
    '#type' => 'email',
    '#title' => 'Address',
    '#required' => TRUE,
    '#description' => 'A required email address field.',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  return $form;
}