|
|
Zend Framework 2 Documentation (Manual) | |
|
File: /_sources/modules/zend.form.element.textarea.txt
Size: | 684 |
Storage flags: | no_autoload,compress/gzip (50%) |
:orphan:
.. _zend.form.element.textarea:
Textarea
^^^^^^^^
``Zend\Form\Element\Textarea`` represents a textarea form input.
It can be used with the ``Zend\Form\View\Helper\FormTextarea`` view helper.
``Zend\Form\Element\Textarea`` extends from :ref:`Zend\\Form\\Element <zend.form.element>`.
.. _zend.form.element.textarea.usage:
.. rubric:: Basic Usage
This element automatically adds a ``"type"`` attribute of value ``"textarea"``.
.. code-block:: php
:linenos:
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);
For more information about the PHK package format: http://phk.tekwire.net