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

Bug #2913 Crosslink (Checkbox) Problem
Submitted: 2004-12-07 13:29 UTC
From: alex dot petri at gmx dot de Assigned: justinpatrin
Status: Closed Package: DB_DataObject_FormBuilder
PHP Version: 4.3.9 OS: W2K
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 : 37 - 35 = ?

 
 [2004-12-07 13:29 UTC] alex dot petri at gmx dot de
Description: ------------ if you have crossinks in your Form that is generated with DO Formbuilder, and you click on submit, the values are stored in DB correctly but they dont display correctly. This error occurs, if you process a form, and freeze it after it is submitted. And if you have fields(i.e. textfields) with rules - which causes errors on submit (through wrong userdata)- then the data from checkboxes are also lost. Reproduce code: --------------- in file DB/DataObject/FormBuilder.php goto method &_generateForm(...) Line around 962 fill in: if(in_array($key, $selected_options)){ // echo "direct from DB ---- > "; $crossLinkDefaults[$groupName][$key]=$key; // echo $key."<br>\n"; } // old one: // $crossLinksElement = $this->_createCheckbox($groupName.'['.$key.']', $value, $key, in_array($key, $selected_options)); $crossLinksElement = $this->_createCheckbox($groupName.'['.$key.']', $value, $key, false); and on LINE 1185 (these are the last lines of this method) // Assign default values to the form //print_r($crossLinkDefaults); if(isset($crossLinkDefaults)) $formValues=array_merge($formValues,$crossLinkDefaults); $form->setDefaults($formValues); return $form; Expected result: ---------------- now crosslinks work correctly, as expected the same could be done with tripleLinks

Comments

 [2004-12-07 16:38 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-12-07 19:34 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!