On this page

View Helpers

FormPassword

The FormPassword view helper can be used to render an <input type="password"> HTML form input. It is meant to work with the Password element.

Basic usage

use Laminas\Form\Element;

$element = new Element\Password('my-password');

// Within your view...
echo $this->formPassword($element);

Output:

<input type="password" name="my-password" value="">