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 #5497

Input element ID

Details

Request #5497Input element ID
Submitted2005-09-22 14:30 UTC
Fromadgnot at hotmail dot com
StatusClosed
PackageHTML_QuickForm
PHP Version4.3.11
OSlinux
Roadmaps(Not assigned)

Comments

[2005-09-22 14:30 UTC] adgnot at hotmail dot com

Description:
------------
Is it possible to put the name of the element as its default ID like <input type="text" name="test" id="test" value=""> ?
Thanks a lot for your amazing work, it helps a lot !!!

[2005-11-21 19:33 UTC] dreamwerx at gmail dot com

You can either specify it when creating the element:

$frm->addElement('text', 'test1', 'Name:', array('id' => '57'));

- OR -

You might try subclassing HTML_QuickForm, override the addElement method. Add extra code in it to grab the element name and pass all the data forward to parent addElement method along with the additional id/option info. This way all if your elements would have id's that match their names.

[2005-11-22 09:26 UTC] adgnot at hotmail dot com

never mind