function form_test_form_form_test_state_persist_alter
Implements hook_form_FORM_ID_alter().
See also
File
-
modules/
simpletest/ tests/ form_test.module, line 1684
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;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.