conceptover

Recent News

How to create select element in Zend Framework?

To create select element in Zend framework you have to write following code. This code snippet add select element to the form, Then you have to render this element in view of the form
$this->add(array(
‘type’ => ‘ZendFormElementSelect’,
‘name’ => ‘size_unit’,
‘attributes’ => array(
‘id’ => ‘size_unit’,
),
‘options’ => array(
‘label’ => ”,
// ’empty_option’ => ”,
‘value_options’ => @$arrSelectData[‘sizeUnits’],
),
));

Leave a Reply

Your email address will not be published. Required fields are marked *