function batch_test_multistep_form_submit
Submit handler for the multistep form.
File
-
modules/
simpletest/ tests/ batch_test.module, line 153
Code
function batch_test_multistep_form_submit($form, &$form_state) {
batch_test_stack(NULL, TRUE);
switch ($form_state['storage']['step']) {
case 1:
batch_set(_batch_test_batch_1());
break;
case 2:
batch_set(_batch_test_batch_2());
break;
}
if ($form_state['storage']['step'] < 2) {
$form_state['storage']['step']++;
$form_state['rebuild'] = TRUE;
}
// This will only be effective on the last step.
$form_state['redirect'] = 'batch-test/redirect';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.