You are here

public function GAPushFormValidateSettingsForm::buildForm in GA Push 8

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides ConfigFormBase::buildForm

File

modules/form_validate/src/Form/GAPushFormValidateSettingsForm.php, line 23

Class

GAPushFormValidateSettingsForm
Ga Push Validate Settings Form.

Namespace

Drupal\ga_push_form_validate\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('ga_push_form_validate.settings');
  $form['form_list'] = [
    '#type' => 'textarea',
    '#title' => $this
      ->t('Active forms'),
    '#default_value' => $config
      ->get('form_list'),
    '#rows' => 10,
    '#description' => $this
      ->t('Insert the form ids to be logged on validate by line. You can use regular expressions.'),
  ];
  $form['show_form_ids'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Show form ids'),
    '#default_value' => $config
      ->get('show_form_ids'),
  ];
  return parent::buildForm($form, $form_state);
}