1 batch_test.module batch_test_chained_form()

Form with chained submit callbacks.

File

core/modules/simpletest/tests/batch_test.module, line 176
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;
}