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 drupal/modules/simpletest/tests/form_test.module
Implements hook_menu().

File

drupal/modules/simpletest/tests/form_test.module, line 1928
Helper module for the form API tests.

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