function MultistepForm::fapiExamplePageTwoBack
Same name in other branches
- 3.x modules/form_api_example/src/Form/MultistepForm.php \Drupal\form_api_example\Form\MultistepForm::fapiExamplePageTwoBack()
- 4.0.x modules/form_api_example/src/Form/MultistepForm.php \Drupal\form_api_example\Form\MultistepForm::fapiExamplePageTwoBack()
Provides custom submission handler for 'Back' button (page 2).
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
File
-
form_api_example/
src/ Form/ MultistepForm.php, line 188
Class
- MultistepForm
- Provides a form with two steps.
Namespace
Drupal\form_api_example\FormCode
public function fapiExamplePageTwoBack(array &$form, FormStateInterface $form_state) {
$form_state->setValues($form_state->get('page_values'))
->set('page_num', 1)
->setRebuild(TRUE);
}