maxhugen
Posts: 272
|
| Posted: 01/06/2009, 5:48 PM |
|
I have an email field in a Record, with Input Validation set to "Email".
As sometimes the email is copied from another webpage, it's not unusual to inadvertently have a space at the beginning or end - and this will cause the validation to (correctly) fail.
The logical solution seemed to be to use the php function trim(), but the CCS built-in validation runs before the OnValidate event, so I can't use trim() there.
Any suggestions please?
MTIA
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
mentecky
Posts: 321
|
| Posted: 01/06/2009, 6:48 PM |
|
Max,
Try it in the page After Initialize.
Rick
_________________
http://www.ccselite.com |
 |
 |
maxhugen
Posts: 272
|
| Posted: 01/06/2009, 7:19 PM |
|
Thanks Rick
Although that didn't seem "intuitive" (to me, anyway), it certainly worked!
Cheers
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
mentecky
Posts: 321
|
| Posted: 01/06/2009, 7:30 PM |
|
Quote maxhugen:
Thanks Rick
Although that didn't seem "intuitive" (to me, anyway), it certainly worked!
Cheers
Max,
It's because EVERY submit to a form goes back to the same page, even if your result page is somewhere else. So the initialize functions will be called first.
Glad to help.
Rick
_________________
http://www.ccselite.com |
 |
 |
|