QFC - Bug when storing the arrays in the container?
| From: | Mike Carter | Date: | Wed, 05 Nov 2003 11:39:48 +0000 |
| Subject: | QFC - Bug when storing the arrays in the container? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-8764@lists.php.net to get a copy of this message | ||
Hi,
Got a real headache problem. Quickform controller is not storing my checkbox
values correctly.
The HTML generated by quickform is fine for the page. I have an array of
checkboxes which are added to the page using:
foreach($list as $key => $value){
$this->addElement('advcheckbox', "familyhistory[{$key}]", $value,
null);
}
The array, $list, is a simple associative array of '2876587' => 'bob a job'
style.
When I go to the next page and var_dump() the container the array of
$familyhistory has had all the $key values replaced!! The numbering seems
ot take the first element $familyhistory[$key] and then increases the $key
for each element - totally ignoring the *real* key that was posted when the
form page was submitted.
I'd be happy to help debug if this really is a major bug. From an initial
look at my code I cannot see anything inbetween which can cause the problem.
It must occur in the container session storing?
Regards,
--
Mike Carter
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________