You are here

public static function WebformSubmissionResendForm::submitAjaxElementCallback in Webform 8.5

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

Ajax element submit 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 WebformAjaxElementTrait::submitAjaxElementCallback

File

src/Form/WebformSubmissionResendForm.php, line 249

Class

WebformSubmissionResendForm
Defines a webform that resends webform submission.

Namespace

Drupal\webform\Form

Code

public static function submitAjaxElementCallback(array $form, FormStateInterface $form_state) {

  // Unset the message so that it can be completely rebuilt.
  NestedArray::unsetValue($form_state
    ->getUserInput(), [
    'message',
  ]);
  $form_state
    ->unsetValue('message');

  // Rebuild the form.
  $form_state
    ->setRebuild();
}