Troyh
Posts: 13
|
| Posted: 11/27/2008, 9:11 PM |
|
im using ccs 3.2
php
mysql
hello everyone
for example when you fill in a form and forget to fill in a required field you get a error saying
eg: "The value in field Name is required."
my client wants these errror messages to show in a popup or as they say "in you face" so you no you have to fill them in.
this is because the people who will be using this system dont no much about submiting forms and things of that nature.
regards
Troy
|
 |
 |
mentecky
Posts: 321
|
| Posted: 11/28/2008, 5:39 AM |
|
Troy,
If you select your form component there is a "On Submit" client side event. You can add validation there and use something like alert("Field 1 is required"). If you generate an error set result = false and that should do it.
Rick
_________________
http://www.ccselite.com |
 |
 |
Troyh
Posts: 13
|
| Posted: 11/29/2008, 8:50 PM |
|
Thank you mentecky
that works great, but when i click cancel it still tells me to enter the required fields , is there a way fix that.
regards
Troy
|
 |
 |
mentecky
Posts: 321
|
| Posted: 11/29/2008, 11:48 PM |
|
Quote Troyh:
Thank you mentecky
that works great, but when i click cancel it still tells me to enter the required fields , is there a way fix that.
regards
Troy
Try moving the code to the Submit button's OnClick client side event. That way it will only validate when the submit button is clicked, leaving cancel alone.
Rick
_________________
http://www.ccselite.com |
 |
 |
Troyh
Posts: 13
|
| Posted: 11/30/2008, 12:25 AM |
|
thanks mentecky
working good now thanks of your help
troy
|
 |
 |
mentecky
Posts: 321
|
| Posted: 11/30/2008, 3:46 AM |
|
Troy,
No problem. Glad we could help!
Rick
_________________
http://www.ccselite.com |
 |
 |