ZF-9149: Posible bug in attribute disabled="disabled" in Zend_Form_Element_CheckBox
Description
Example form:
<?php
class Form_Test extends Zend_Form
{
public function init() {
$checkbox = $this->createElement('checkbox','foo',array('label' => 'foo'));
$checkbox->setAttrib('disabled','disabled');
$submit = $this->createElement('submit','submit');
$this->addElements(array(
$checkbox,
$submit
));
}
}
Actual rendering result for checkbox:
Expected result:
When i use $checkbox->setAttrib('disable',true) in form, is all right.
Comments
Posted by Lukas Drbal (lestr) on 2010-02-11T09:07:14.000+0000
This is my patch and unittest for this posible bug
Posted by Lukas Drbal (lestr) on 2010-02-11T09:08:23.000+0000
sorry for bad priority
Posted by Lukas Drbal (lestr) on 2010-02-11T09:12:04.000+0000
repair code formating :-/
Posted by Karsten Wutzke (kwutzke) on 2011-01-19T04:54:00.000+0000
Both issues show the rendering produces a redundant extra hidden input before the checkbox.
Posted by Karsten Wutzke (kwutzke) on 2011-01-19T04:54:59.000+0000
Related and linked to ZF-1666, however that issue still prevails and should be reopened.
Posted by Erin Atkinson (keepcase) on 2011-05-28T18:26:08.000+0000
Hi Lukas, we patched FormCheckbox.php with your patch file and noticed when we used the disable feature the actual checkbox could not be clicked.
Posted by Brian (tastywheat) on 2011-05-29T04:06:55.000+0000
We used 1.11.6 Zend Library when we had this issue.