Hey guys,
So I went to this article >
http://www.chronoengine.com/faqs/54-cfv4/cfv4-validation/2656-how-can-i-add-a-custom-client-side-validation.html
Did everything as asked.
But the validation doesn't seem to be working..
The javascript it's loading (first in the onload)
(the regex formula is for a dutch mobile number).
It doesn't trow me an error when I'm filling something else than that number in.. Which of course it should. Am I doing something wrong?
This is the page! Hope you can help me
https://www.independent-duinrand.nl/index.php?option=com_chronoforms5&chronoform=Machtigingsformulier
So I went to this article >
http://www.chronoengine.com/faqs/54-cfv4/cfv4-validation/2656-how-can-i-add-a-custom-client-side-validation.html
Did everything as asked.
But the validation doesn't seem to be working..
The javascript it's loading (first in the onload)
function customCheck(el){
if ( !el.val().match(/^\+316\d{8}$/) ) {
return false;
} else {
return true;
}
}
(the regex formula is for a dutch mobile number).
It doesn't trow me an error when I'm filling something else than that number in.. Which of course it should. Am I doing something wrong?
This is the page! Hope you can help me
https://www.independent-duinrand.nl/index.php?option=com_chronoforms5&chronoform=Machtigingsformulier
Hello timzuidgeest,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I add a Custom Client side validation?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I add a Custom Client side validation?
P.S: I'm just an automated service😉
Hi Automated service, thanks but no thanks😉.
I've already checked that article out, and it didn't help me further.
Hope someone can help me!
I've already checked that article out, and it didn't help me further.
Hope someone can help me!
Hi Tim,
Which Chronoforms version do you have ?
Regards,
Max
Which Chronoforms version do you have ?
Regards,
Max
Hi timzuidgeest,
It looks as if the function isn't being called. You have this class in the input validate['required','%customCheck'] which is the old CFv4 code. In CFv5 it looks as if it is validate['required', 'custom:customCheck']
Or, better, you can scroll down the validation tab and add the function name to the Custom function box at the bottom.
Bob
It looks as if the function isn't being called. You have this class in the input validate['required','%customCheck'] which is the old CFv4 code. In CFv5 it looks as if it is validate['required', 'custom:customCheck']
Or, better, you can scroll down the validation tab and add the function name to the Custom function box at the bottom.
Bob
Thank you Bob for you quick reply!
The validate['required', 'custom:customCheck'] works as a charm!! Thanks!
Maybe it's handy to change that on that page that I looked? (Don't know if you can do that)
The validate['required', 'custom:customCheck'] works as a charm!! Thanks!
Maybe it's handy to change that on that page that I looked? (Don't know if you can do that)
This topic is locked and no more replies can be posted.