I used to deal with this issue exactly for surveys I had to build. Basically, for checkboxes I always had a hidden formfield with the same name as each checkbox containing the "off" value (i.e. if the checkbox is a 1, the off would be a 0 - this fit most cases). Obviously, if you need to remove them from the structure, you could deal with that in your form processing code. Usually I just left the off values in there.
- Brian Rinaldi
From: "Stephen Adams" <[EMAIL PROTECTED]>
Sent: Tuesday, March 14, 2006 12:00 PM
To: [email protected]
Subject: [CFCDev] Using a structure to hold values when paging through a recordset
Hi,
In the application I'm writing the user can page through a resultset. I have stored the results set in a session variables so that it is available when the page reloads (displaying the next page). As the user goes through these pages they can check a number of checkboxes as they go. The value for these check boxes are added to a structure again stored in the session scope so its available after the page reloads.
The problem I'm having is if the user goes back a page and unchecks some checkboxes then goes forward to the next page how can I remove from the session structure the uncheck values.
I do have one idea, every time the page is loaded I can compare the existing structures values against what has been passed by the submitted form and removing the values that are in the session structure that are not in form, but I'm not sure this will work as I hope.
Has anyone else done something like this?
Stephen
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
- Re: [CFCDev] Using a structure to hold values when pagin... Chris Stoner
- Re: [CFCDev] Using a structure to hold values when ... Barry Beattie
- [CFCDev] Appending XML: Ung, Seng
- Re: [CFCDev] Appending XML: Shib71
- RE: [CFCDev] Appending XML: Ung, Seng
- Re: [CFCDev] Appending XML: Nathan Dintenfass
- RE: [CFCDev] Appending XML: Ung, Seng
- Re: [CFCDev] Using a structure to hold values when ... Stephen Adams
- Re: [CFCDev] Using a structure to hold values w... Bill Rawlinson
- Re: [CFCDev] Using a structure to hold valu... Stephen Adams
- re: [CFCDev] Using a structure to hold values when pagin... Brian Rinaldi
