I am using zend_form (part of Zend Framwork) to create a form and found when I add a set of checkboxes using Zend_Form\'s multicheckbox element (Zend_Form_Element_MultiCheck
Here are some additionnal information about multiCheckBox rendering customization
I wanted the checkboxes' labels to prepend instead of append (this default behaviour is hardcoded). As the ZF reference guide isn't talkative about it, I finally got into the core code to figure out how to customize it. Have a look to Zend_View_Helper_FormRadio::formRadio() for more info.
It's possible to modify the checkboxes decorator via the multiCheckBox options : adding some options prefixed with label_.
Here is my form element :
$this->addElement('multiCheckbox', 'stars_number', array(
'filters' => array('Int'),
'escape' => false, // to allow html in the labels
'separator' => '', // to keep everything inline
'label_placement' => 'prepend',
'label_class' => 'stars', // custom css needed
'decorators' => $decorator_chain, // decorators array defined upper, and passed to many elements of the form
));
I hope this will help some to save hours of unsuccessful google crawling...