public function WebformSubmissionForm::validateAjaxForm in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::validateAjaxForm()
Validate 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.
Overrides WebformAjaxFormTrait::validateAjaxForm
File
- src/
WebformSubmissionForm.php, line 3113
Class
- WebformSubmissionForm
- Provides a webform to collect and edit submissions.
Namespace
Drupal\webformCode
public function validateAjaxForm(array &$form, FormStateInterface $form_state) {
if (!$this
->isCallableAjaxCallback($form, $form_state)) {
// Invalidate cache tags to prevent any caching issues.
// @see https://www.drupal.org/project/drupal/issues/2352009
Cache::invalidateTags([
'webform:' . $this
->getWebform()
->id(),
]);
$this
->missingAjaxCallback($form, $form_state);
}
}