On this page

Elements

Textarea

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

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

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