|
Size: | 9031 |
Storage flags: | no_autoload,compress/gzip (32%) |
The FormSelect view helper can be used to render a group <input type="select"> HTML form input. It is meant to work with the Zend\Form\Element\Select element, which provides a default input specification for validating a select.
FormSelect extends from Zend\Form\View\Helper\FormInput.
Basic usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | use Zend\Form\Element;
$element = new Element\Select('language');
$element->setValueOptions(array(
'0' => 'French',
'1' => 'English',
'2' => 'Japanese',
'3' => 'Chinese'
));
// Within your view...
/**
* Example
*/
echo $this->formSelect($element);
|
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.