How to set radio button attribute to checked if value or id matched?

zend-mvc
zend-view

#1

Hi All,
I have one question
I have an element

  • Male
  • Female
  • Other
I want to get an element using ID attribute? is there any function in ZF2 like $form->getElement('gender')? I have tried few functions like getId etc etc but didn't able to get that element. I want to set attribute checked by matching value. Please suggest Thanks

#2

Zend\Form\Element\Radio extends MultiCheckbox - see the API at

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/