|
Size: | 10489 |
Storage flags: | no_autoload,compress/gzip (31%) |
The Form view helper is used to render a <form> HTML element and its attributes.
It iterates through all its elements and relies on the FormCollection and FormRow view helpers to render them appropriately.
You can also use Zend\Form\View\Helper\FormRow in conjunction with Form::openTag() and Form::closeTag() to have a more fine grained control over the output.
Basic usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /**
* inside view template
*
* @var \Zend\View\Renderer\PhpRenderer $this
* @var \Zend\Form\Form $form
*/
echo $this->form($form);
// i.e.
// <form action="" method="POST">
// <label>
// <span>Some Label</span>
// <input type="text" name="some_element" value="">
// </label>
// </form>
|
The following public methods are in addition to those inherited from Zend\Form\View\Helper\AbstractHelper.
Prepares and renders the whole form.
Parameters: | $form – A Form object. |
---|---|
Return type: | string |
Renders the <form> open tag for the $form instance.
Return type: | string |
---|
Renders a </form> closing tag.
Return type: | string |
---|
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.