ZF-4006: Zend_Dojo_View_Helper_Checkbox works incorrect
Description
Here is example: <?= $this->checkBox( "checkBoxName", '0', //current value array(), array(), array( 'checkedValue' => '1', 'unСheckedValue' => '0', ) );
Our current value is '0', as you can see in second param. And now it is impossible to make this checkbox ever checked, because it generates the following code in html: As you can see - the value always woul be '0' and there is no possibility to make it '1';
Now, last 2 rows of Zend_Dojo_View_Helper_CheckBox are the following: // and final element $html .= $this->_createFormElement($id, $value, $params, $attribs);
And to fix this bug they should be changed to: // and final element $html .= $this->_createFormElement($id, $checkboxInfo['checkedValue'], $params, $attribs);
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-08-22T14:51:51.000+0000
Scheduling for RC3
Posted by Matthew Weier O'Phinney (matthew) on 2008-08-23T20:48:38.000+0000
Fixed in trunk and 1.6 release branch.
Posted by Wil Sinclair (wil) on 2008-09-02T10:38:55.000+0000
Updating for the 1.6.0 release.