You are here

public function ClientsideValidationjQuerySettingsForm::submitForm in Clientside Validation 8.2

Same name and namespace in other branches
  1. 8 clientside_validation_jquery/src/Form/ClientsideValidationjQuerySettingsForm.php \Drupal\clientside_validation_jquery\Form\ClientsideValidationjQuerySettingsForm::submitForm()
  2. 3.0.x clientside_validation_jquery/src/Form/ClientsideValidationjQuerySettingsForm.php \Drupal\clientside_validation_jquery\Form\ClientsideValidationjQuerySettingsForm::submitForm()
  3. 2.0.x clientside_validation_jquery/src/Form/ClientsideValidationjQuerySettingsForm.php \Drupal\clientside_validation_jquery\Form\ClientsideValidationjQuerySettingsForm::submitForm()

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

clientside_validation_jquery/src/Form/ClientsideValidationjQuerySettingsForm.php, line 76

Class

ClientsideValidationjQuerySettingsForm
Class ClientsideValidationjQuerySettingsForm.

Namespace

Drupal\clientside_validation_jquery\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('clientside_validation_jquery.settings');
  $config
    ->set('use_cdn', $form_state
    ->getValue('use_cdn'));
  $config
    ->set('cdn_base_url', $form_state
    ->getValue('cdn_base_url'));
  $config
    ->set('validate_all_ajax_forms', $form_state
    ->getValue('validate_all_ajax_forms'));
  $config
    ->set('force_validate_on_blur', $form_state
    ->getValue('force_validate_on_blur'));
  $config
    ->save();
  return parent::submitForm($form, $form_state);
}