function form_test_storage_page_cache_form
A simple form for testing form storage when page caching is enabled.
1 string reference to 'form_test_storage_page_cache_form'
- form_test_menu in modules/
simpletest/ tests/ form_test.module - Implements hook_menu().
File
-
modules/
simpletest/ tests/ form_test.module, line 874
Code
function form_test_storage_page_cache_form($form, &$form_state) {
$form['title'] = array(
'#type' => 'textfield',
'#title' => 'Title',
'#required' => TRUE,
);
$form['test_build_id_old'] = array(
'#type' => 'item',
'#title' => 'Old build id',
'#markup' => 'No old build id',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save',
);
$form['rebuild'] = array(
'#type' => 'submit',
'#value' => 'Rebuild',
'#submit' => array(
'form_test_storage_page_cache_rebuild',
),
);
$form['#after_build'] = array(
'form_test_storage_page_cache_old_build_id',
);
$form_state['cache'] = TRUE;
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.