Remember that the CFPARAM default value doesn't necessarily have to be
FALSE.  It should be whatever value you want the checkbox to return when it
is unchecked.

Just as a reality check, did you make sure that you do have a DEFAULT
parameter value in the CFPARAM and that the checkbox name matches?  Can you
post your form and receiving page code so we can look it over?  Something is
mixed up somewhere...

Chris Lofback
Sr. Web Developer

TRX Integration
28051 US 19 N., Ste. C
Clearwater, FL  33761
www.trxi.com


> -----Original Message-----
> From: Yexley Robert D Contr Det 1 AFRL/WSI
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 25, 2002 11:53 AM
> To: CF-Talk
> Subject: RE: Properly handling checkboxes
> 
> 
> I tried the whole <cfparam name="form.checkboxName" 
> default="F"> thing, and it didn't work for me.  It kept 
> generating errors telling me that <checkboxName> is undefined 
> in <form>.  I thought that would be the answer too, but it 
> didn't work properly.
> 
> Bob
> <)))><
> 
> 
> -----Original Message-----
> From: Chris Lofback [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, September 25, 2002 11:46 AM
> To: CF-Talk
> Subject: RE: Properly handling checkboxes
> 
> 
> Use a CFPARAM on the page that receives the form submission 
> and default the checkbox fields to FALSE.  Because the 
> checkbox does not get submitted if unchecked (ie, set to 
> false), the receiving page handles it properly.
> 
> Chris Lofback
> Sr. Web Developer
> 
> TRX Integration
> 28051 US 19 N., Ste. C
> Clearwater, FL  33761
> www.trxi.com
> 
> 
> > -----Original Message-----
> > From: Yexley Robert D Contr Det 1 AFRL/WSI 
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 25, 2002 11:31 AM
> > To: CF-Talk
> > Subject: Properly handling checkboxes
> > 
> > 
> > I've got an HTML form that consists of mostly checkboxes.
> > Initially, when I tested submitting the form, it was giving 
> > me problems for the checkboxes that were NOT checked.  So I 
> > figured, OK, I need to figure out some way to get the current 
> > value of the checkbox, then go ahead and set it to checked, 
> > and then I'll be able to submit the form.  So I wrote a 
> > little JavaScript function that loops through all of the 
> > items in the form, if it's a checkbox, it checks whether or 
> > not it is checked, and sets it's value, then it sets it to 
> > checked, and then it submits the form.  All well and good, 
> > and actually does what I need it to do, IF the user ends up 
> > being satisfied with the options that they checked.  I'd like 
> > to go ahead have the action template for the form also be a 
> > confirmation page, which will allow the user to review the 
> > options that they've checked, and then submit their options 
> > to our database.  My problem now though, is that if a user 
> > realizes that they've inadvertently c!
> > hecked a box that they didn't mean to, or didn't check a box 
> > that they needed to, I can put a link on that page so that 
> > they can go back to the form and correct their options, but 
> > when you just go back (using something like javascript: 
> > history.go(-1) or something like that), now ALL of the 
> > checkboxes are checked.  Is there a better way (I'm sure 
> > there must be, I just don't know what it is) to handle the 
> > submission of forms with checkboxes, so that if a user has to 
> > go back to the form and make changes, that it will set the 
> > form back to what they had originally selected?  Any thoughts 
> > or ideas would be greatly appreciated.
> > 
> > ::YEX::
> > <)))><
> > 
> > /*
> > || Robert D. Yexley
> > || Oracle Programmer/Analyst
> > || Northrop Grumman IT
> > || Contractor - Wright Research Site MIS
> > || Det-1 AFRL/WSI Bldg. 45 Rm. 062
> > || (937) 255-1984
> > || [EMAIL PROTECTED]
> > || <)))><
> > */
> > 
> >  <<Robert D. Yexley (E-mail).vcf>>
> > 
> > 
> 
> 
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to