protected function YamlFormSubmissionForm::wizardSubmit in YAML Form 8
Form submission handler for the wizard submit action.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
2 calls to YamlFormSubmissionForm::wizardSubmit()
- YamlFormSubmissionForm::next in src/
YamlFormSubmissionForm.php - Form submission handler for the 'next' action.
- YamlFormSubmissionForm::previous in src/
YamlFormSubmissionForm.php - Form submission handler for the 'previous' action.
File
- src/
YamlFormSubmissionForm.php, line 654
Class
- YamlFormSubmissionForm
- Provides a form to collect and edit submissions.
Namespace
Drupal\yamlformCode
protected function wizardSubmit(array &$form, FormStateInterface $form_state) {
if ($this
->draftEnabled() && $this
->getYamlFormSetting('draft_auto_save') && !$this->entity
->isCompleted()) {
$form_state
->setValue('in_draft', TRUE);
$this
->submitForm($form, $form_state);
$this
->save($form, $form_state);
}
else {
$this
->submitForm($form, $form_state);
}
$this
->rebuild($form, $form_state);
}