View Helpers

In This Article

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 Zend\Form\Element;

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

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

Output:

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

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