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

Form constructor to test the #required property without #title.

File

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

Code

function form_test_validate_required_form_no_title($form, &$form_state) {
  $form['textfield'] = array(
    '#type' => 'textfield',
    '#required' => TRUE,
  );
  $form['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array('#type' => 'submit', '#value' => 'Submit');
  return $form;
}