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

Form constructor for testing form state persistence.

File

core/modules/simpletest/tests/form_test.module, line 2008
Helper module for the form API tests.

Code

function form_test_state_persist($form, &$form_state) {
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => 'title',
    '#default_value' => 'DEFAULT',
    '#required' => TRUE,
  );
  $form_state['value'] = 'State persisted.';

  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}