Elements

In This Article

Text

Zend\Form\Element\Text represents a text form input. It should be used with the FormText view helper.

Basic Usage

This element automatically adds a type attribute of value text.

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

$text = new Element\Text('my-text');
$text->setLabel('Enter your name');

$form = new Form('my-form');
$form->add($text);

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