DO Formbuilder: crosslinks (checkboxes) Problem solved !! ?

From: Date: Mon, 06 Dec 2004 12:37:42 +0000
Subject: DO Formbuilder: crosslinks (checkboxes) Problem solved !! ?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16048@lists.php.net to get a copy of this message
The Problem was if you do a submit on a form with crosslinks and you want to show the form again (direct after it is submitted) you will recognize that the "checked"-value on crosslinks are lost... (i described the problem a short time ago in this mailing list) Now i hope i solved this Problem: in file DB/DataObject/FormBuilder.php Linie (around) 962 i changed this line: $crossLinksElement = $this->_createCheckbox($groupName.'[]', $value, $key, in_array($key, $selected_options)); to this line: $crossLinksElement = $this->_createCheckbox($groupName.'['.$key.']', $value, $key, in_array($key, $selected_options)); note this: '['.$key.']' now it seems to work... it would be great to update the whole class if there are no side effects... another point are triple links LINE (around)1041 $tripleLinksElement = $this->_createCheckbox('__tripleLink_' . $tripleLink['table'] . '[' . $key1 . '][]', i guess there should be also: $tripleLinksElement = $this->_createCheckbox('__tripleLink_' . $tripleLink['table'] . '[' . $key1 . ']['.$key2.']',

« previous php.pear.general (#16048) next »