1 batch_test.module | batch_test_chained_form_submit_1($form, &$form_state) |
Submit handler #1 for the chained form.
File
- core/
modules/ simpletest/ tests/ batch_test.module, line 201 - Helper module for the Batch API tests.
Code
function batch_test_chained_form_submit_1($form, &$form_state) {
batch_test_stack(NULL, TRUE);
batch_test_stack('submit handler 1');
batch_test_stack('value = ' . $form_state['values']['value']);
$form_state['values']['original'] = $form_state['values']['value'];
$form_state['values']['counter'] = 1;
$form_state['values']['value'] = $form_state['values']['original'] . '-' . $form_state['values']['counter'];
batch_set(_batch_test_batch_1());
// This redirect should not be taken into account.
$form_state['redirect'] = 'should/be/discarded';
}