On this page

View Helpers

FormEmail

The FormEmail view helper can be used to render a <input type="email"> HTML5 form input. It is meant to work with the Email element, which provides a default input specification with an email validator.

Basic usage

use Laminas\Form\Element;

$element = new Element\Email('my-email');

// Within your view...

echo $this->formEmail($element);
// Result: <input type="email" name="my-email" value="">