
- Forum
- Programming Talk
- Coldfusion
- ColdFusion checkbox
ColdFusion checkbox
This is a discussion on ColdFusion checkbox within the Coldfusion forums, part of the Programming Talk category; How to fetch the value from checkbox selected in one page to other page linked by submit button.?...
-
01-26-2011, 01:19 PM #1
- Join Date
- Jan 2011
- Answers
- 1
ColdFusion checkbox
How to fetch the value from checkbox selected in one page to other page linked by submit button.?
-
Assuming the checkbox on your 1st page is as follows,
On the action page, if the checkbox is not checked then it will not be available in the form scope when submitted. So, you could see if it exists in the form scope by IsDefined like this,Code:<cfinput type="checkbox" name="chkNotifyMe" value="Yes">
or, you could use cfparam like this,Code:<cfif IsDefined("Form.chkNotifyMe'"> <!-- use the checkbox --> <cfelse> <!-- Something else --> </cfif>
HTH!!!Code:<cfparam name="Form.chkNotify" default="No"> <cfif Form.chkNotifyMe EQ "Yes"> <!-- notify the user --> <cfelseif Form.chkNotifyMe EQ "Yes"> <!-- do not notify the user --> </cfif>
-
04-16-2012, 04:15 PM #3
- Join Date
- Apr 2012
- Answers
- 12
This little bit helps more than I thought it would. Now I'm off to the rest of the tutorials...
-
So, what instances would this type of checkbox be used versus another type, such as PHP? Sometimes I have a hard enough time learning these programming script languages and then I can't decide how to apply them-or when to apply them.
-
Sponsored Ads

Reply With Quote





