1 form_test.module | _form_test_input_forgery($form, &$form_state) |
Build a form to test input forgery of enabled elements.
File
- core/
modules/ simpletest/ tests/ form_test.module, line 2143 - 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;
}