public static function WebformSubmissionForm::removeConfirmationModal in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::removeConfirmationModal()
Hide confirmation modal during form validation.
This prevent duplicate modal dialog from appearing.
File
- src/
WebformSubmissionForm.php, line 2450
Class
- WebformSubmissionForm
- Provides a webform to collect and edit submissions.
Namespace
Drupal\webformCode
public static function removeConfirmationModal(&$element, FormStateInterface $form_state, &$complete_form) {
// Reset confirmation modal.
$storage = $form_state
->getStorage();
unset($storage['webform_confirmation_modal']);
$form_state
->setStorage($storage);
// Remove modal from form.
unset($complete_form['webform_confirmation_modal']);
}