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_altselect » Bug #10102

Can not set individual attributes

Details

Submitted2007-02-14 21:12 UTC
Fromi at g8w dot de
Assignedshangxiao
StatusClosed
PackageHTML_QuickForm_altselect
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2007-02-14 21:12 UTC] i at g8w dot de

Description:
------------
Can“t set individual attributes, like style or class for the elements. An example in the documentation is missing.

Test script:
---------------
$form->addElement('altselect', 'test', 'Test:', $items, array('class' => 'option'));

Expected result:
----------------
<input id="qf_ea0c54" class="option" type="checkbox" value="1" name="test[]"/>

Actual result:
--------------
<input type="checkbox" id="qf_ea0c54" value="1" name="test[]"/>

[2007-02-27 05:52 UTC] shangxiao at php dot net

Yes in the comments I've mistakenly described this as a HTML attribute array or string. It's actually supposed to be a hash of option values => HTML Attribute array/string. I'll update the documentation.