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_Renderer_Tableless » Bug #8236

Adding a "id" on Fieldset

Details

Request #8236Adding a "id" on Fieldset
Submitted2006-07-18 07:03 UTC
Fromv8kf6x11fb5v06l at jetable dot org
Assignedwiesemann
StatusClosed
PackageHTML_QuickForm_Renderer_Tableless
PHP Version4.3.2
OSLinux
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 !