Issue Type: Sub-task Created: 2008-05-28T08:57:42.000+0000 Last Updated: 2010-04-05T10:07:08.000+0000 Status: Closed Fix version(s): - 1.5.3 (28/Jul/08)
Reporter: Dimitri van Hees (s481797) Assignee: Christian Albrecht (alab) Tags: - Zend_Form
Related issues: - ZF-2989
The empty definition term which is placed using Zend_Form when radio buttons are being generated is not XHTML valid. Therefore I suggest that, if the doctype is set to XHTML, the wrapper either doesn't place the empty definition term
, or places a nonbraking space inside it . This has been fixed if no label is set (http://framework.zend.com/issues/browse/ZF-2989) but appearantly radio buttons use different 'label generation' by default. I think this is also the case with checkboxes.
Posted by Matthew Weier O'Phinney (matthew) on 2008-05-28T14:01:07.000+0000
Can you post a small reproduce case to clearly show this behavior, please?
Posted by Dimitri van Hees (s481797) on 2008-05-29T04:17:48.000+0000
$radio = new Zend_Form_Element_Radio('radio'); $radio->addMultiOptions(array('radio_1'=>'Radio 1', 'radio_2'=>'Radio 2', 'radio_3'=>'Radio 3')); $form->addElements(array($radio));
without any decorators etc. the above php code will output the following html (I also don't understand why the style="white-space: nowrap;" is being generated by default, but that's another issue perhaps):
Radio 1Radio 2Radio 3 instead, it should output
because an empty isn't xhtml valid.
Posted by Matthew Weier O'Phinney (matthew) on 2008-05-29T05:05:42.000+0000
Confirmed; scheduling for next mini release.
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-22T12:02:59.000+0000
Actually, funny thing about this one is that it's actually an issue with the Label decorator; if a tag is provided as an option, but no label, it simply spits out the tag with no content. I'm updating to have it provide a no-break space for content.
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-22T12:04:54.000+0000
Fixed in trunk and 1.5 and 1.6 release branches.
Posted by Robin Skoglund (robinsk) on 2008-10-08T18:43:13.000+0000
The situation described is not invalid XHTML, and the non-breaking space should be removed.
Posted by Matthew Weier O'Phinney (matthew) on 2008-10-09T05:51:52.000+0000
Robin, the markup did not validate, plain and simple. After the changes, it does. Re-closing.
Posted by Christian Albrecht (alab) on 2010-04-05T10:07:07.000+0000
Closing as duplicate of Parent Issue.
Have you found an issue?
See the Overview section for more details.