Build a form to test input forgery of enabled elements.

1 string reference to '_form_test_input_forgery'
form_test_menu in modules/simpletest/tests/form_test.module
Implements hook_menu().

File

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

Code

function _form_test_input_forgery($form, &$form_state) {

  // For testing that a user can't submit a value not matching one of the
  // allowed options.
  $form['checkboxes'] = array(
    '#type' => 'checkboxes',
    '#options' => array(
      'one' => 'One',
      'two' => 'Two',
    ),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}