You are here

public function SimpleRecaptchaWebformHandler::submitConfigurationForm in Simple Google reCAPTCHA 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().

Overrides WebformHandlerBase::submitConfigurationForm

File

modules/simple_recaptcha_webform/src/Plugin/WebformHandler/SimpleRecaptchaWebformHandler.php, line 130

Class

SimpleRecaptchaWebformHandler
Webform submission handler plugin.

Namespace

Drupal\simple_recaptcha_webform\Plugin\WebformHandler

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  parent::submitConfigurationForm($form, $form_state);
  $values = $form_state
    ->getValues();
  $this->configuration['recaptcha_type'] = $values['recaptcha']['recaptcha_type'];
  $this->configuration['v3_score'] = $values['recaptcha']['v3_score'];
  $this->configuration['v3_error_message'] = $values['recaptcha']['v3_error_message'];
}