Forums

Prevent submission

KatoKalin 29 Sep, 2009
I have addded some custom validation code to my form. The code works and thats not the problem.
There is only one thing, when validation fails, it is still possible to submit the form.
The validation that comes with Chronoforms has some function build in that prevents submitting the form. For example when a field is required and it remains empty then it´s not possible to submit the form. Its not just that the button is disabled. The button is clickable but it does not submit.
Now I am wondering if I could utilise this funcion for my customer validation as well. This validation checks for forbidden expressions and could return anything that is necessary to trigger that built in function of Chronoforms and it would be great if the form just dont get submitted as well if the validation fails.

So how can I do that?
GreyHead 29 Sep, 2009
Hi KatoKalin,

ChronoForms is using LiveValidation - please check the docs there and you will know more than I do.

Bob
KatoKalin 29 Sep, 2009
Thanks for pointing me to LiveValidation. I took a look at the customcode section and I think this is what I need.
However I have not the slightest clue how to get this to work with my already existing function within a form.
For all other validation types I found classes within Chronoforms which have to be added to the field that should get validated. There is no such class for custom code.
As said I have no idea here, so if there is anybody willing to help it would be appreciated.
This topic is locked and no more replies can be posted.