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 1581
Helper module for the form API tests.

Code

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