0

hi i am using zend form , i created a

Zend_Form_Element_Radio element

that have two options

yes , no

in my form it shows vartically ,one button below the other . i want to add them horizontally .

this is my radio button code

    $radio = new Zend_Form_Element_Radio('yes');
    $radio-> setLabel('Are you booking for someone else ?');
    $radio->addMultiOptions(array('yes','no'));
    $radio->setDecorators(array(
                                array('ViewHelper',
                                            array('helper' => 'formRadio')
                                ),
                                array('Label',
                                            array('class' => 'label')
                                ),
                             )
                        );  

can i view them horizontally ?? please help ?

Kanishka Panamaldeniya
  • 17,302
  • 31
  • 123
  • 193

1 Answers1

2

Did a quick search, maybe this post will help?

Display Zend_Form_Element_Radio on one line

From the old answer:

You need to call the setSeparator method on the Zend_Form_Element_Radio object, passing it ''.

Good luck!

Community
  • 1
  • 1
baraboom
  • 1,398
  • 9
  • 9