function batch_test_chained_form

Form constructor for a form with chained submit callbacks.

See also

batch_test_chained_form_submit_1()

batch_test_chained_form_submit_3()

batch_test_chained_form_submit_4()

2 string references to 'batch_test_chained_form'
batch_test_menu in drupal/core/modules/system/tests/modules/batch_test/batch_test.module
Implements hook_menu().
batch_test_programmatic in drupal/core/modules/system/tests/modules/batch_test/batch_test.module
Menu callback: Submits the 'Chained' form programmatically.

File

drupal/core/modules/system/tests/modules/batch_test/batch_test.module, line 190
Helper module for the Batch API tests.

Code

function batch_test_chained_form() {

  // This value is used to test that $form_state persists through batched
  // submit handlers.
  $form['value'] = array(
    '#type' => 'textfield',
    '#title' => 'Value',
    '#default_value' => 1,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  $form['#submit'] = array(
    'batch_test_chained_form_submit_1',
    'batch_test_chained_form_submit_2',
    'batch_test_chained_form_submit_3',
    'batch_test_chained_form_submit_4',
  );
  return $form;
}