public function PasswordSettingsForm::buildForm in View Password 8.4
Same name and namespace in other branches
- 8.5 src/Form/PasswordSettingsForm.php \Drupal\view_password\Form\PasswordSettingsForm::buildForm()
- 6.0.x src/Form/PasswordSettingsForm.php \Drupal\view_password\Form\PasswordSettingsForm::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/ PasswordSettingsForm.php, line 25
Class
Namespace
Drupal\view_password\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$config = $this
->config('pwd.settings');
$form['form_id_pwd'] = [
'#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('pwd.form_id_pwd'),
];
return $form;
}