Home » HTML » HTML_QuickForm » Bug #2351
HTML_QuickForm_date() outputting invalid HTML
Details
| Submitted | 2004-09-16 18:47 UTC |
|---|---|
| From | bill at juicytemples dot com |
| Status | Bogus |
| Package | HTML_QuickForm |
| PHP Version | 4.3.1 |
| OS | OS X |
| Roadmaps | (Not assigned) |
Comments
[2004-09-16 18:47 UTC] bill at juicytemples dot com
Description:
------------
The object is outputting invalid HTML. When drawing the currently selected item it is drawing selected="selected". This code won't render properly in Standards Compliant browsers.
HTML_QuickForm 3.2.3
Reproduce code:
---------------
$form->addElement('date', 'foo', 'Foo', array('format'=>'M d Y'));
Expected result:
----------------
Selected elements should be like this:
<option selected="true">Option Text</option>
Actual result:
--------------
Rather than this:
<option selected="selected">Option Text</option>
[2004-09-16 18:52 UTC] bill at juicytemples dot com
I specified the date object, but this appears to stem from a problem in the select object rather than date.
[2004-09-17 08:29 UTC] bmansion at mamasam dot com
http://www.w3.org/TR/xhtml1/#h-4.5
...says the opposite. Every month, there is someone that pops up with new so-called standards without revealing where these new standards have been published and which browser supports or does not support them.
NB: If there is a problem, it is actually in HTML_Common, not in any QuickForm elements.