You are here

public function RegcodeAdminSettingsForm::submitForm in Registration codes 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/RegcodeAdminSettingsForm.php, line 65

Class

RegcodeAdminSettingsForm
Configuration settings for the registration codes module.

Namespace

Drupal\regcode\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('regcode.settings')
    ->set('regcode_field_title', $form_state
    ->getValue('regcode_field_title'))
    ->set('regcode_field_description', $form_state
    ->getValue('regcode_field_description'))
    ->set('regcode_optional', $form_state
    ->getValue('regcode_optional'))
    ->save();
  parent::submitForm($form, $form_state);
}