Using password field on form


#1

I cannot find a way to display password field in login form, you know ******.
This does not work: $form->addField(‘password’, [‘type’=>‘password’]);


#2

Are you on the stable version of Agile UI ? Password field was introduced in 1.1.1:

Additionally addField is currently slightly refactored for version 1.2, described here:


If you can help us with this PR - check out on “gitter.im”, otherwise you can poke around this method:

You may be able to do it like this:

$f = new \atk4\ui\FormField\Password(..);
$form->addField($f);