You are here

public function CSSCaptchaSettingsForm::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

css_captcha/src/Form/CSSCaptchaSettingsForm.php, line 85

Class

CSSCaptchaSettingsForm
CSS CAPTCHA settings form.

Namespace

Drupal\css_captcha\Form

Code

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