Elements

In This Article

Textarea

Zend\Form\Element\Textarea represents a textarea form input. It should be used with the FormTextarea view helper.

Basic Usage

This element automatically adds a type attribute of value textarea.

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

$textarea = new Element\Textarea('my-textarea');
$textarea->setLabel('Enter a description');

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

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