You are here

function form_test_cache_form in Drupal 7

A simple form for testing form caching.

2 string references to 'form_test_cache_form'
FormsFormCacheTestCase::testCacheForm in modules/simpletest/tests/form.test
Tests storing and retrieving the form from cache.
FormsFormCacheTestCase::testCacheFormCustomExpiration in modules/simpletest/tests/form.test
Tests changing form_cache_expiration.

File

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

Code

function form_test_cache_form($form, &$form_state) {
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => 'Title',
    '#required' => TRUE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Save',
  );
  return $form;
}