On this page



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

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

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

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