You are here

public function PasswordEyeSettingsForm::buildForm in Password Eye 8

Same name and namespace in other branches
  1. 2.0.x src/Form/PasswordEyeSettingsForm.php \Drupal\password_eye\Form\PasswordEyeSettingsForm::buildForm()

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/PasswordEyeSettingsForm.php, line 25

Class

PasswordEyeSettingsForm

Namespace

Drupal\password_eye\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($form, $form_state);
  $config = $this
    ->config('password_eye.settings');
  $form['form_id_password'] = [
    '#type' => 'textarea',
    '#title' => $this
      ->t('Enter the form id here.'),
    '#description' => $this
      ->t('Please enter the form id(s) by separating it with a comma. Here the default is user_login_form. You can remove and save the form if you do not want to display the password for this form.'),
    '#default_value' => $config
      ->get('password_eye.form_id_password'),
  ];
  return $form;
}