Home » HTML » HTML_QuickForm_Renderer_Tableless » Bug #8236
Adding a "id" on Fieldset
Details
| Request #8236 | Adding a "id" on Fieldset |
|---|---|
| Submitted | 2006-07-18 07:03 UTC |
| From | v8kf6x11fb5v06l at jetable dot org |
| Assigned | wiesemann |
| Status | Closed |
| Package | HTML_QuickForm_Renderer_Tableless |
| PHP Version | 4.3.2 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-07-18 07:03 UTC] v8kf6x11fb5v06l at jetable dot org
Description:
------------
In Renderer/Tableless.php:
-------------------
Line 76: replace by
var $_openFieldsetTemplate = "\n\t<fieldset{id}>";
-------------
Line 129: Add
$HeaderId = (!empty($name)) ? str_replace('{id}', ' id="'.$name.'"', $this->_openFieldsetTemplate)
: str_replace('{id}', '', $this->_openFieldsetTemplate);
------------
Line 144: Replace by
$this->_html .= $HeaderId . $header_html;
-----------
Test script:
---------------
Now, you can use
$form->addElement('header', 'myHeaderID', 'Some text');
Actual result:
--------------
...
<fieldset id="myHeaderID">
...
Now you can use CSS to manage your fieldsets !