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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 10 - 6 = ?

 
 [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