JimmyCrackedCorn
Posts: 583
|
| Posted: 04/15/2007, 5:08 AM |
|
I have a form with 20 fields. Every field is required and each field has specific formatting requirements. I know I can add validation actions to the form event using the CCS IDE but that gets somewhat tedious to do this for 20 fields (times 2 since I need field required plus specific format).
After a bit of experimenting I found I can simply add the validation action to one field and then, in the code view, simply copy and paste that 19 times and edit each one directly in code view.
But, when I do that the CCS IDE can no longer manage (or even report) the values I have entered.
Am I missing something here? Is there a quick way to do what I'm trying to do?
If not, is there any harm in doing the copy/paste/edit technique I described instead of doing each one through CCS IDE?
_________________
Walter Kempees...you are dearly missed. |
 |
 |
joseph2k
Posts: 72
|
| Posted: 04/15/2007, 9:20 AM |
|
The CCS IDE places the code and a little checksum number at top. So once you edit the code directly rather than through GUI it will not be reflected at the GUI level.
I started off with the validation code and then abandonded it, went to all custom code so I can add a link in the AddErrors section and turn on a warning picture for each problem field as a visual indicator. I wish CCS did this for me automatically.
So in your case, with the GUI just create custom code entry for each field, then copy and paste into each.
|
 |
 |
JimmyCrackedCorn
Posts: 583
|
| Posted: 04/16/2007, 7:17 AM |
|
Quote joseph2k:So in your case, with the GUI just create custom code entry for each field, then copy and paste into each.
Thanks for your response Joseph.
Would I actually need to create a custom code entry for each field using the IDE? Couldn't I just have one custom code entry and do all of my validation in there?
_________________
Walter Kempees...you are dearly missed. |
 |
 |
Benjamin Krajmalnik
|
| Posted: 04/16/2007, 10:30 AM |
|
Not really.
If you are trying to do Server Side validation, you can do it in one shot in
the ValidateForm event.
If you are doing it client side, all it is is Javascript. You can use
CodeCharge's framework, or if you prefer there are tons of generic
validation functinos out there which you can shoose.
|
|
|
 |
|