function form_test_load_include_menu

Form constructor for testing FAPI file inclusion of the file specified in hook_menu().

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

File

modules/simpletest/tests/form_test.file.inc, line 12

Code

function form_test_load_include_menu($form, &$form_state) {
    // Submit the form via Ajax. That way the FAPI has to care about including
    // the file specified in hook_menu().
    $ajax_wrapper_id = drupal_html_id('form-test-load-include-menu-ajax-wrapper');
    $form['ajax_wrapper'] = array(
        '#markup' => '<div id="' . $ajax_wrapper_id . '"></div>',
    );
    $form['button'] = array(
        '#type' => 'submit',
        '#value' => t('Save'),
        '#submit' => array(
            'form_test_load_include_submit',
        ),
        '#ajax' => array(
            'wrapper' => $ajax_wrapper_id,
            'method' => 'append',
            'callback' => 'form_test_load_include_menu_ajax',
        ),
    );
    return $form;
}

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