PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_QuickForm » Bug #2351

HTML_QuickForm_date() outputting invalid HTML

Details

Submitted2004-09-16 18:47 UTC
Frombill at juicytemples dot com
StatusBogus
PackageHTML_QuickForm
PHP Version4.3.1
OSOS 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.