Blair
|
| Posted: 06/16/2003, 9:41 AM |
|
Hi,
I need a validation for my check box which confirms the user has agreed to the terms and conditions. This is a simple yes = checked and no = unchecked. So if box not checked they get an error message ....with all the other error messages on the top of the form that says you must check yes I agree. I can't find any examples of this on the site. I realize its custom code. Do you know what code to use in PHP?
Sincerely
Blair
|
|
|
 |
GreggB
|
| Posted: 06/16/2003, 12:08 PM |
|
For CCS:
In your form properties select “On Validation” Event and try the following code. Unfortunately I’m not in a position to test this code but something like this should work. I’m no PHP master but maybe this will get you started in the right direction.
Depending on how you’ve setup the Properties of your CheckBox makes the difference if you will use a zero 0 or “N”
If CCGetParam(“checkbox”, Empty) == 0 {
$yourformname->Errors->addError("You must Check Yes!");
}
GreggB
|
|
|
 |
|