1 batch_test.module batch_test_multistep_form($form, &$form_state)

Multistep form.

File

core/modules/simpletest/tests/batch_test.module, line 133
Helper module for the Batch API tests.

Code

function batch_test_multistep_form($form, &$form_state) {
  if (empty($form_state['storage']['step'])) {
    $form_state['storage']['step'] = 1;
  }

  $form['step_display'] = array(
    '#markup' => 'step ' . $form_state['storage']['step'] . '<br/>',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );

  return $form;
}