Zend Framework: Rádió gombok egyedi megjelenítése a template-ben

Belefutottam egy olyan esetbe, hogy a rádiógombokat külön kellett megjeleníteni a sablonban a design miatt.

A formRadio helpert kellett elővenni, használni.

Az ötletet a Stackoverflow-n találtam:
http://stackoverflow.com/questions/8257466/zend-how-to-get-individual-radio-button-in-viewscript
http://stackoverflow.com/questions/3962081/edit-individual-radio-buttons-in-zend-form-view-script
http://framework.zend.com/apidoc/2.0/classes/Zend.Form.View.Helper.FormRadio.html

Minta:

A form a View-nak átadott űrlap: $this->view->form = $form;
A radio_choice az űrlap egyik eleme.

 

               formRadio(
                            $this->form->radio_choice->getFullyQualifiedName(),
                            $this->form->radio_choice->getValue(),
                            null,
                            array(1 => $this->form->radio_choice->getMultiOption(1))
                    );
                    ?>
                                        formRadio(
                            $this->form->radio_choice->getFullyQualifiedName(),
                            $this->form->radio_choice->getValue(),
                            null,
                            array(2 => $this->form->radio_choice->getMultiOption(2))
                    );
                    ?>

Blogbook : PHP | Javascript | Laravel | Corcel | CodeIgniter | VueJs | ReactJs | WordPress