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

Implements hook_form_FORM_ID_alter().

See also

form_test_state_persist()

File

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

Code

function form_test_form_form_test_state_persist_alter(&$form, &$form_state) {
  // Simulate a form alter implementation inserting form elements that enable
  // caching of the form, e.g. elements having #ajax.
  if (!empty($_REQUEST['cache'])) {
    $form_state['cache'] = TRUE;
  }
}