It appears the best solution is based on the answer above by squirrel. As the input being inside a label is hard coded the best solution is to change this behavour. You can either do this by modifying the Zend_View_Helper_FormRadio class or override it with your own custom view header. I would recommend the custom header option as modifying the zend framework would be a bad idea as it would need updating everytime you updated the framework, have an effect on anyone or any project using that copy of the framework etc. By using a custom helper it will be specific to the project and it will not affect anything else nor will it be affected by updating the framework (however you may find you need to update the helper if the framework update has changed some behaviours). What I did which is working well is:
1 - Created a model/module in the library, I called mine website. This first involves creating a folder in the library the same name as the model. Thus I have library > website
Edit: Forgot to say you will need to register the plugin library either via the bootstrap or application.ini. I find it is easiest just add:
autoloaderNamespaces[] = "Website_"
Anywhere below appnamespace
2 - I created the relevant subfolders and file for the class Website_View_Helper_FormRadio which will override Zend_View_Helper_FormRadio. Thus the folder and file stucture is
website > view > helper > FormRadio.php
3 - I then copied the contents of the formRadio function from Zend_View_Helper_FormRadio into Website_View_Helper_FormRadio within the class. I then modified it with the code that squirrel referred thus the Website_View_Helper_FormRadio class that inherits from Zend_View_Helper_FormRadio like so:
class Website_View_Helper_FormRadio extends Zend_View_Helper_FormRadio
{
public function formRadio($name, $value = null, $attribs = null, $options = null, $listsep = "<br />\n")
{
// The code from the formRadio function in Zend_View_Helper_FormRadio with
// the modification from the code squirrel referred to
}
}
This then gives us our own copy of the class with our modified code that inherits from the zend version of the FormRadio element.
You can now just use the Zend Form Radio element like normal and it will use our improvements
Note if you wish to have the same effect on MultiCheckbox or checkbox you need to make these use our version of form radio as these elements use form radio as a basis. To do this we create our own versions of these in our library and make them inherit from our version. We would therefore have for multicheckbox the following:
library > website > view > helper > FormMultiCheckbox.php
Would be a copy of Zend_View_Helper_FormMultiCheckbox
Then replace the line:
class Zend_View_Helper_FormMultiCheckbox extends Zend_View_Helper_FormRadio
with:
class Website_View_Helper_FormMultiCheckbox extends Website_View_Helper_FormRadio
I hope that helps someone.