function form_test_state_persist

Form constructor for testing form state persistence.

1 string reference to 'form_test_state_persist'
form_test_menu in modules/simpletest/tests/form_test.module
Implements hook_menu().

File

modules/simpletest/tests/form_test.module, line 1653

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.