drop down menu - How to make a selectbox the label of a radio button in Zend Fw -
drop down menu - How to make a selectbox the label of a radio button in Zend Fw -
not idea, need set of radio buttons, lastly buttons value select box. visual explanation:
o opt 1
o opt 2
o |___selectbox|
what in html:
<input type="radio" name="radioset">opt1 </input> <input type="radio" name="radioset">opt2 </input> <input type="radio" name="radioset"><!-- opt 3 --> <select> <option value="a"> aaa</option> <option value="b"> bbb</option> </select> </input>
what i've done in zf far:
$picker = new zend_form_element_select('selectbox', array( 'multioptions' => array('a'=>'aaa', 'b' =>'bbb'), 'decorators' => array( array('label', array('escape'=>false)) ) )); $this->addelement( 'radio', 'radioset', array( 'multioptions' => array( 'x'=>'opt1', 'y'=>'opt2', 'z'=>$picker //'dropdown picker' ), 'label' => 'my title:', 'decorators' => array( 'viewhelper', 'errors', array('description', array('escape' => false)), 'label', array('htmltag', array('tag'=>'div')), ), ) );
but returns 3 radio buttons, labels "opt1" , "opt2", nil after 3rd radio button.
i want html code shown above, zf code not homecoming it. thought how can accomplished?
thanks!
unfortunately going have write decorator replace label tag select. looking @ code zend_form_element_radio() adds label tag radio.
zend-framework drop-down-menu radio-button zend-form
Comments
Post a Comment