In This Article


Zend\Form\Element\Password represents a password form input. It can be used with the FormPassword view helper.

Basic Usage

This element automatically adds a type attribute of value password.

use Zend\Form\Element;
use Zend\Form\Form;

$password = new Element\Password('my-password');
$password->setLabel('Enter your password');

$form = new Form('my-form');

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