function form_test_load_include_custom

Menu callback for testing custom form includes.

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

File

modules/simpletest/tests/form_test.module, line 1938

Code

function form_test_load_include_custom($form, &$form_state) {
    $form['button'] = array(
        '#type' => 'submit',
        '#value' => t('Save'),
        '#submit' => array(
            'form_test_load_include_submit',
        ),
    );
    // Specify the include file and enable form caching. That way the form is
    // cached when it is submitted, but needs to find the specified submit handler
    // in the include.
    // Filename is a bit weird here: modules/simpletest/tests/form_test.file.inc
    form_load_include($form_state, 'inc', 'form_test', 'form_test.file');
    $form_state['cache'] = TRUE;
    return $form;
}

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