function batch_test_chained_form in Drupal 7
Form with chained submit callbacks.
2 string references to 'batch_test_chained_form'
- batch_test_menu in modules/
simpletest/ tests/ batch_test.module - Implement hook_menu().
- batch_test_programmatic in modules/
simpletest/ tests/ batch_test.module - Menu callback: programmatically submits the 'Chained' form.
File
- modules/
simpletest/ tests/ batch_test.module, line 177 - 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;
}