You are here

public function WebformSubmissionForm::cancelAjaxForm in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::cancelAjaxForm()

Cancel form #ajax callback.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

\Drupal\Core\Ajax\AjaxResponse An Ajax response that display validation error messages or redirects to a URL

Overrides WebformDialogFormTrait::cancelAjaxForm

File

src/WebformSubmissionForm.php, line 3106

Class

WebformSubmissionForm
Provides a webform to collect and edit submissions.

Namespace

Drupal\webform

Code

public function cancelAjaxForm(array &$form, FormStateInterface $form_state) {
  throw new \Exception('Webform submission Ajax form should never be cancelled. Only ::reset should be called.');
}