ZF-9149: Posible bug in attribute disabled="disabled" in Zend_Form_Element_CheckBox


Example form:

class Form_Test extends Zend_Form
    public function init() {
        $checkbox = $this->createElement('checkbox','foo',array('label' => 'foo'));     
        $submit = $this->createElement('submit','submit');      

Actual rendering result for checkbox:

Expected result:

When i use $checkbox->setAttrib('disable',true) in form, is all right.


This is my patch and unittest for this posible bug

sorry for bad priority

repair code formating :-/

Both issues show the rendering produces a redundant extra hidden input before the checkbox.

Related and linked to ZF-1666, however that issue still prevails and should be reopened.

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.

We used 1.11.6 Zend Library when we had this issue.