> I have a single file that's supposed to enter form data from several > pages into a database. It checks to see if a form exists and if it > does, then it enters it's value into the database. > The problem that I'm running into is that when checkboxes aren't > checked, they don't exist with structKeyExists(form,'the_checkbox'). > If I'm on a page that has a checkbox and it's not checked, I want to > set the value to 0, but if I'm on a form without any checkboxes, I > want to leave the value in the database alone. I'm trying to use > this UPDATE page for the several pages that make up a section because > I'd rather not make a UPDATE page for each screen.
You will have to have some way of tracking within your form data whether there was originally a checkbox in the page. One easy way to do this is to simply add a hidden form field within that page. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208237 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54