function form_example_wizard_previous_submit
Submit handler for the "previous" button.
This function:
- Stores away $form_state['values']
- Decrements the step counter
- Replaces $form_state['values'] with the values from the previous state.
- Forces form rebuild.
You are not required to change this function.
Related topics
1 string reference to 'form_example_wizard_previous_submit'
- form_example_wizard in form_example/
form_example_wizard.inc - The primary formbuilder function for the wizard form.
File
-
form_example/
form_example_wizard.inc, line 156
Code
function form_example_wizard_previous_submit($form, &$form_state) {
$current_step =& $form_state['step'];
$form_state['step_information'][$current_step]['stored_values'] = $form_state['input'];
if ($current_step > 1) {
$current_step--;
$form_state['values'] = $form_state['step_information'][$current_step]['stored_values'];
}
$form_state['rebuild'] = TRUE;
}