To add check box to Zend framework form we have to add checkbox element to the form and then we have to print that element in Zend framework view. Here is code for checkbox in Zend framework

           ‘type’ => ‘Checkbox’,
           ‘name’ => ‘status’,
            ‘options’ => array(
                ‘label’ => ‘Status:’,
               ‘use_hidden_element’ => true,
               ‘checked_value’ => AdministrationEntityProperty::FOR_Yes,
                ‘unchecked_value’ => AdministrationEntityProperty::FOR_No,
Now add this form element to view
Here is code

echo $this->formLabel($Form->get(‘status’));
                        echo $this->formSelect($Form->get(‘status’));


Leave a Reply

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