You are here

public function NoAutoCompleteAdminSettingsForm::buildForm in No Autocomplete 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

src/Form/NoAutoCompleteAdminSettingsForm.php, line 30

Class

NoAutoCompleteAdminSettingsForm
Form to set our options..

Namespace

Drupal\no_autocomplete\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('no_autocomplete.settings');
  $form['no_autocomplete_login_form'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Use "autocomplete=off" on user login form'),
    '#default_value' => $config
      ->get('no_autocomplete_login_form'),
  ];
  return parent::buildForm($form, $form_state);
}