How to add radio button to Zend framework form?
To create Radio button in Zend framework form we have following code.Zend framework add elements to form and these elements are added to view to represent to front end.
here is following code to add radio button in zend framework form.
$this->add(array(
‘type’ => ‘ZendFormElementRadio’,
‘name’ => ‘status’,
// ‘type’ => ‘Text’,
‘attributes’ => array(
‘id’ => ‘status’,
),
‘options’ => array(
‘label’ => ‘Status:’,
‘value_options’ => array(
AdministrationEntityProperty::FOR_YES => ‘yes’,
AdministrationEntityProperty::FOR_NO => ‘no’,
),
)
));