|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
In attempting to build a terms and conditions code i wrote this by the way haven't firgured it out yet could use the script and NO javascript is not really an option or i would of done it already. Thx.
To validate a checkbox... 1. put this on top of page Code:
<cfparam name="Form.Alas" default="Whateveruwant"> 2. Put checkbox Code:
<input name="Alas" type="checkbox" id="Alas" value="Yes"> 3. Validate it Code:
<CFIF Alas NEQ "Yes"> Ahh you idiot!!!!!! -Alas |
|
#2
|
|||
|
|||
|
Two things...number 1 and number 3 actually need to be on the form's action page, not the page with the form in it. Just wanted to make that clear so no one got confused.
Also, for number 3, you could actually do this: <cfif not alas> ....you didn't check the box...
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Heres how to validate a checkbox |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|