Hello,
I would like to add a custom error message on a field (for example e-mail).
I would not do it by adding text in title field for user can see this text when overing the field.
I am trying doing this by adding a "Load JavaScript" module on the "on load" bloc (on the top of it).
Then, in th JS Code field, I am adding this :
Could you please help me ?
Thank you in advance.
I would like to add a custom error message on a field (for example e-mail).
I would not do it by adding text in title field for user can see this text when overing the field.
I am trying doing this by adding a "Load JavaScript" module on the "on load" bloc (on the top of it).
Then, in th JS Code field, I am adding this :
<?php
jQuery.gvalidation.errors.required = "test required custom message";
jQuery.gvalidation.errors.email = "test email message"
?>
But... it is not working...
Could you please help me ?
Thank you in advance.
Hi Fredd,
The second line is missing a ; at the end. Is that the problem here?
Bob
The second line is missing a ; at the end. Is that the problem here?
Bob
Hello Bob,
Thank you for your reply.
I have added the ";" at the end, but I still have the by default message : "Please enter a valid email."...
Thank you for your reply.
I have added the ";" at the end, but I still have the by default message : "Please enter a valid email."...
Hi Fredd,
And remove the <?php ?> tags as this isn't PHP - sorry, I missed those before.
Bob
And remove the <?php ?> tags as this isn't PHP - sorry, I missed those before.
Bob
Hi Bob,
It worse when i remove the PHP tags : I can't see the tooltip anymore, nore the red dotted for "requires fields"...
An when I send the form, I got the error message (erro.png).
Here is my code :
jQuery.gvalidation.errors.required = "test required custom message";
jQuery.gvalidation.errors.email = "test email message";
It worse when i remove the PHP tags : I can't see the tooltip anymore, nore the red dotted for "requires fields"...
An when I send the form, I got the error message (erro.png).
Here is my code :
jQuery.gvalidation.errors.required = "test required custom message";
jQuery.gvalidation.errors.email = "test email message";
Hi Fredd,
I just tested [url=http://j3.greyhead.org/index.php?option=com_chronoforms5&chronoform=test_custom_validation_message]here[/URL] and it appears to be working correctly.
I copied and pasted your code into a Load JavaScript action before the HTML (Render form) action in the On Load event of the form.
Bob
I just tested [url=http://j3.greyhead.org/index.php?option=com_chronoforms5&chronoform=test_custom_validation_message]here[/URL] and it appears to be working correctly.
I copied and pasted your code into a Load JavaScript action before the HTML (Render form) action in the On Load event of the form.
Bob
Hi Bob,
Well, it appears that it was due to the CF component version !
I update from Chronoforms_V5.0_Component_RC5 to Chronoforms_V5.0.9_Component and it seems to work !
I am going to carry on my tests to see if everything is ok.
Thank you very much for your help.
Well, it appears that it was due to the CF component version !
I update from Chronoforms_V5.0_Component_RC5 to Chronoforms_V5.0.9_Component and it seems to work !
I am going to carry on my tests to see if everything is ok.
Thank you very much for your help.
Hi Fredd,
That makes sense - Max must have added this feature it in a later version.
Bob
That makes sense - Max must have added this feature it in a later version.
Bob
Hello Bob (me again !),
Could you tell me how to add other fiel warning ?
For example, I have other fields like "name", "surname", "phone", or even an email check (email control field that must be exactly the same as the "email" field above.
Thank you very much.
Could you tell me how to add other fiel warning ?
For example, I have other fields like "name", "surname", "phone", or even an email check (email control field that must be exactly the same as the "email" field above.
Thank you very much.
Hi Fredd,
The gvalidation.errors.email message is only applied when you are checking for a valid email so I guess the others aren't the same.
You can edit the validation language file if you need to or add custom messages in the Title box of the input element.
Bob
The gvalidation.errors.email message is only applied when you are checking for a valid email so I guess the others aren't the same.
You can edit the validation language file if you need to or add custom messages in the Title box of the input element.
Bob
Great !
It works by using : jQuery.gvalidation.errors.confirm="my text";
Thank you !
Euh, one last thing if I can : is it possible to put multi fields in "dynamic subject" (i have tested with "name, surname" my static subject) but it doesn't work...😢
It works by using : jQuery.gvalidation.errors.confirm="my text";
Thank you !
Euh, one last thing if I can : is it possible to put multi fields in "dynamic subject" (i have tested with "name, surname" my static subject) but it doesn't work...😢
This topic is locked and no more replies can be posted.