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

Remove input hidden-ID from frozen checkbox

Details

Request #5840Remove input hidden-ID from frozen checkbox
Submitted2005-11-01 15:10 UTC
Fromsoenke at city-map dot de
StatusWont fix
PackageHTML_QuickForm
PHP Version5.0.5
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2005-11-01 15:10 UTC] soenke at city-map dot de

Description:
------------
Hi, i guess the ID of the hidden field of frozen checkboxes is unnecessary, because there is no <label> tag at all.

in my case it's a bug, too, because for some diff view of two forms I compare two toHtml()'s from elements, and even if thery are the same content, in my case they aren't equal because of the generated ID.

Here is a simple one-line patch against 3.2.5 I wrote:

*** checkbox.php_ 2005-11-01 15:51:12.000000000 +0100
--- checkbox.php 2005-11-01 15:52:30.000000000 +0100
***************
*** 137,142 ****
--- 137,143 ----
function getFrozenHtml()
{
if ($this->getChecked()) {
+ $this->removeAttribute('id');
return '<tt>[x]</tt>' .
$this->_getPersistantData();
} else {

[2005-11-01 15:18 UTC] soenke at city-map dot de

Should be indeed:

*** checkbox.php_ 2005-11-01 15:51:12.000000000 +0100
--- checkbox.php 2005-11-01 16:11:41.000000000 +0100
***************
*** 136,141 ****
--- 136,142 ----
*/
function getFrozenHtml()
{
+ $this->removeAttribute('id');
if ($this->getChecked()) {
return '<tt>[x]</tt>' .
$this->_getPersistantData();

[2005-11-15 08:22 UTC] soenke at city-map dot de

Works - thank you!