function _form_test_input_forgery

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

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.