_form_test_input_forgery

7 form_test.module _form_test_input_forgery($form, &$form_state)
8 form_test.module _form_test_input_forgery($form, &$form_state)

Build a form to test input forgery of enabled elements.

1 string reference to '_form_test_input_forgery'

File

modules/simpletest/tests/form_test.module, line 1303
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;
}
Login or register to post comments