Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.2

Bug #18361 crossLink with value of 0 not getting checked
Submitted: 2011-03-13 15:20 UTC
From: madsliejensen Assigned:
Status: Open Package: DB_DataObject_FormBuilder (version 1.0.1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2011-03-13 15:20 UTC] madsliejensen (Mads Lie Jensen)
Description: ------------ A form with users, containing a crossLink to usergroups, where one of the usergroups has an id of 0, does not get checked when the form is displayed. FormBuilder does create the checkbox for the usergroup with id 0, and when checked on the form, and save form, the value is correctly set in the crossLink-table. The error is in method _createCheckbox() of class DB_DataObject_FormBuilder_QuickForm on line 324: if ($checked) { $element->setChecked(true); } instead I think this should be: if (null !== $checked && false !== $checked) { $element->setChecked(true); }

Comments