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 ?

1 Answer 1

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.