function form_test_state_persist in Drupal 7
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 - 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;
}