View Helpers

In This Article

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

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

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

Output:

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

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