RE: Validating Checkboxes
The value is held in the value= portion of the cfinput tag and can be referenced after a submit as form.name where name is the name= portion of the cfinput tag. #strLocationName#, #strStateAbvrIDFK# If you have several dynamically generated checkboxes (which sounds more like what you were asking) and you want a quick check you can do the following. May be more useful on a validation page code here (i.e. tell the user they must check at least one check box) other code (process the boxes that were checked) or you can use this (more likely on a processing page) processing code here You could set the value initially to "no" with a cfparam then if the checkbox gets checked, the value will get changed to the value in the cfinput tag but given the above examples, this seems like a waste of time. Not sure exactly what you're looking for, if none of the responses you've gotten so far have helped, rephrase your question and give an example / some code. If you get your answer, post a thanks so people won't keep trying to answer. An example / code may lead to other options like radio buttons etc. HTH Stephen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 9:19 AM To: CF-Talk Subject: RE: Validating Checkboxes I always use ifDefined("form.checkbox") to see if the box was checked. Using CFParam seems (very slightly) more error prone to me. Brian -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 5:45 PM To: CF-Talk Subject: RE: Validating Checkboxes I am trying to pass a value if when a box is selected. Right now I use a CFPARAM default ="". On submit it looks like it does something even though it really does not. Carlos Roque I.S., WebMaster x2154 -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 11:07 AM To: CF-Talk Subject:RE: Validating Checkboxes what kind of validation? please explain -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 10:18 AM To: CF-Talk Subject: Validating Checkboxes Anyone have a good method in CF for validating checkboxes (grouped). Carlos Roque I.S., WebMaster x2154 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validating Checkboxes
I always use code like and in the processing page and I've never had any problems with it. Mind you, I haven't tested any sites with Nutscrape 6 yet... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 23 February 2001 14:19 To: CF-Talk Subject: RE: Validating Checkboxes I always use ifDefined("form.checkbox") to see if the box was checked. Using CFParam seems (very slightly) more error prone to me. Brian -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 5:45 PM To: CF-Talk Subject: RE: Validating Checkboxes I am trying to pass a value if when a box is selected. Right now I use a CFPARAM default ="". On submit it looks like it does something even though it really does not. Carlos Roque I.S., WebMaster x2154 -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 11:07 AM To: CF-Talk Subject: RE: Validating Checkboxes what kind of validation? please explain -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 10:18 AM To: CF-Talk Subject: Validating Checkboxes Anyone have a good method in CF for validating checkboxes (grouped). Carlos Roque I.S., WebMaster x2154 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validating Checkboxes
I always use ifDefined("form.checkbox") to see if the box was checked. Using CFParam seems (very slightly) more error prone to me. Brian -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 5:45 PM To: CF-Talk Subject: RE: Validating Checkboxes I am trying to pass a value if when a box is selected. Right now I use a CFPARAM default ="". On submit it looks like it does something even though it really does not. Carlos Roque I.S., WebMaster x2154 -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 11:07 AM To: CF-Talk Subject: RE: Validating Checkboxes what kind of validation? please explain -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 10:18 AM To: CF-Talk Subject: Validating Checkboxes Anyone have a good method in CF for validating checkboxes (grouped). Carlos Roque I.S., WebMaster x2154 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validating Checkboxes
You might need to post the snippet of code for the submit and action pages... Radio and Checkboxes if nothing is selected do not get passed back to the server. cfparam name="Checkbox_Name" default=""> will only set it up as null if its not already set up. But as for validation, what do you mean by this. Do you mean validate that it exists, validate the data or something completely different:-) -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: 23 February 2001 09:45 To: CF-Talk Subject: RE: Validating Checkboxes I am trying to pass a value if when a box is selected. Right now I use a CFPARAM default ="". On submit it looks like it does something even though it really does not. Carlos Roque I.S., WebMaster x2154 -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 11:07 AM To: CF-Talk Subject:RE: Validating Checkboxes what kind of validation? please explain -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 10:18 AM To: CF-Talk Subject: Validating Checkboxes Anyone have a good method in CF for validating checkboxes (grouped). Carlos Roque I.S., WebMaster x2154 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validating Checkboxes
I am trying to pass a value if when a box is selected. Right now I use a CFPARAM default ="". On submit it looks like it does something even though it really does not. Carlos Roque I.S., WebMaster x2154 -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 11:07 AM To: CF-Talk Subject: RE: Validating Checkboxes what kind of validation? please explain -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 10:18 AM To: CF-Talk Subject: Validating Checkboxes Anyone have a good method in CF for validating checkboxes (grouped). Carlos Roque I.S., WebMaster x2154 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validating Checkboxes
Bad news using ListContains... because this list contains 3 103,33,13,23,53 do a ListFind.. 3 will not be found in this list. 103,33,13,23,53 Heath -Original Message- From: sebastian palmigiani [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 2:38 PM To: CF-Talk Subject: Re: Validating Checkboxes on 2/21/01 1:07 PM, Phoeun Pha at [EMAIL PROTECTED] wrote: > Anyone have a good method in CF for validating checkboxes (grouped). Since the form gives you a comma delimited list of values of the boxes checked I would test with ListContains(variableName, variableValue). Sebastian ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Validating Checkboxes
on 2/21/01 1:07 PM, Phoeun Pha at [EMAIL PROTECTED] wrote: > Anyone have a good method in CF for validating checkboxes (grouped). Since the form gives you a comma delimited list of values of the boxes checked I would test with ListContains(variableName, variableValue). Sebastian ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validating Checkboxes
what kind of validation? please explain -Original Message- From: Roque,Carlos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 10:18 AM To: CF-Talk Subject: Validating Checkboxes Anyone have a good method in CF for validating checkboxes (grouped). Carlos Roque I.S., WebMaster x2154 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Validating Checkboxes
Anyone have a good method in CF for validating checkboxes (grouped). Carlos Roque I.S., WebMaster x2154 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists