You are here

public function SettingsForm::submitForm in Confirm popup 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

src/Form/SettingsForm.php, line 44

Class

SettingsForm

Namespace

Drupal\js_confirm_pop_up\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = \Drupal::service('config.factory')
    ->getEditable('js_confirm_pop_up.settings');
  $config
    ->set('js_confirm_pop_up_id', $form_state
    ->getValue('js_confirm_pop_up_actual_form_id'))
    ->save();
  parent::submitForm($form, $form_state);
}