On this page
Caution
The documentation you are viewing is for an older version of this component.
Switch to the latest (v3) version.
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="">