On this page

View Helpers

FormText

The FormText view helper can be used to render an <input type="text"> HTML form input. It is meant to work with the Text element.

Basic usage

use Laminas\Form\Element;

$element = new Element\Text('my-text');

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

Output:

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