You are here

public function FooCaptchaSettingsForm::submitForm in CAPTCHA Pack 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 ConfigFormBase::submitForm

File

foo_captcha/src/Form/FooCaptchaSettingsForm.php, line 46

Class

FooCaptchaSettingsForm
Foo CAPTCHA settings form.

Namespace

Drupal\foo_captcha\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('foo_captcha.settings')
    ->set('foo_captcha_ignore_spaces', $form_state
    ->getValue('foo_captcha_ignore_spaces'))
    ->save();
  parent::SubmitForm($form, $form_state);
}