You are here

public function LongIdForm::submitForm in CAPTCHA 8

Form submission handler.

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 FormInterface::submitForm

File

modules/captcha_long_form_id_test/src/Form/LongIdForm.php, line 41

Class

LongIdForm
Class LongIdForm.

Namespace

Drupal\captcha_long_form_id_test\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Display result.
  foreach ($form_state
    ->getValues() as $key => $value) {
    $this
      ->messenger()
      ->addMessage($key . ': ' . $value);
  }
}