Index: /library/Zend/View/Helper/FormRadio.php =================================================================== --- /library/Zend/View/Helper/FormRadio.php (revision 7102) +++ /library/Zend/View/Helper/FormRadio.php (working copy) @@ -53,10 +53,12 @@ * * @param array|string $attribs Attributes added to each radio. * + * @param boolean $genHidden Whether or not to generate hidden fields. + * * @return string The radio buttons XHTML. */ public function formRadio($name, $value = null, $attribs = null, - $options = null, $listsep = "
\n") + $options = null, $listsep = "
\n", $genHidden = true) { $info = $this->_getInfo($name, $value, $attribs, $options, $listsep); @@ -75,8 +77,12 @@ // the radio button values and labels settype($options, 'array'); - // default value if none are checked - $xhtml = $this->_hidden($name, null); + $xhtml = ''; + + if ($genHidden) { + // default value if none are checked + $xhtml = $this->_hidden($name, null); + } // build the element if ($disable) { @@ -89,7 +95,11 @@ foreach ($options as $opt_value => $opt_label) { if ($opt_value == $value) { // add a return value, and a checked text. - $opt = $this->_hidden($name, $opt_value) . '[x]'; + $opt = ''; + if ($genHidden) { + $opt .= $this->_hidden($name, $opt_value); + } + $opt .= '[x]'; } else { // not checked $opt = '[ ]';