Home » HTML » HTML_QuickForm » Bug #5497
Input element ID
Details
| Request #5497 | Input element ID |
|---|---|
| Submitted | 2005-09-22 14:30 UTC |
| From | adgnot at hotmail dot com |
| Status | Closed |
| Package | HTML_QuickForm |
| PHP Version | 4.3.11 |
| OS | linux |
| 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