On this page

View Helpers


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);


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

Found a mistake or want to contribute to the documentation? Edit this page on GitHub!