Hi,
I try to make a client side validation.
What i want to do is this: I have a form with a field where you you can type max. 12 characters or number. But only when you type in 6 characters or number you should be able to see the next form (I add a Redirect in the "On submit" area).
I tried this with a "Load JavaScript" in the "On load" area with this function
And in the Designer area in the field "crew_id" ich put following in the Validation/Custon function:
But its not working.
May be someone can help me.
Thanks a lot
Jörg
I try to make a client side validation.
What i want to do is this: I have a form with a field where you you can type max. 12 characters or number. But only when you type in 6 characters or number you should be able to see the next form (I add a Redirect in the "On submit" area).
I tried this with a "Load JavaScript" in the "On load" area with this function
function Crew_NumberCheck(el){
if ( !el.val().match(/^\b\w{6}\b/g) {
return false;
} else {
return true;
}
}
And in the Designer area in the field "crew_id" ich put following in the Validation/Custon function:
validate['required','%Crew_NumberCheck']
But its not working.
May be someone can help me.
Thanks a lot
Jörg
Hi Jörg,
If I understand the Help note correctly I think that you only need to put Crew_NumberCheck in the Custom Function box.
Bob
If I understand the Help note correctly I think that you only need to put Crew_NumberCheck in the Custom Function box.
Bob
Hi Bob,
I set the Custom Function Box to "Crew_NumberCheck".
But its not working.
?
Jörg
I set the Custom Function Box to "Crew_NumberCheck".
But its not working.
?
Jörg
Here comes the link: http://baggageexpress.de/index.php/de/?option=com_chronoforms5&chronoform=Test
Hi Jörg,
There's a JavaScript error on the page "Uncaught SyntaxError: Unexpected token { baggageexpress.de: 250"
I think that you are missing a ) in the if () line of the function.
Bob
There's a JavaScript error on the page "Uncaught SyntaxError: Unexpected token { baggageexpress.de: 250"
I think that you are missing a ) in the if () line of the function.
Bob
This topic is locked and no more replies can be posted.