When a form is submitted via AJAX and it have validation errors (for example a required field is empty), I need to execute a JS file over the returned form, but I havent find a way to do it. Is there a solution to this problem?
Thanks
When a form is submitted via AJAX and it have validation errors (for example a required field is empty), I need to execute a JS file over the returned form, but I havent find a way to do it. Is there a solution to this problem?
Thanks
Can you give me more information on what you are trying to do as well as a link to your form?
Hi David,
I have a script wich do some modifications over the inputs (adds placeholders and things like that). When I load the form that script is executed normally but if I send the form via AJAX and it have errors, the form returned with errors isnt affected by my script:
I need to execute again that script when the form has errors. I guess that the problem may be solved easily if i send the form via POST, but i need to send the form via AJAX request.
I cant show you the form cause it is in my local server :(
Thanks
Help please :(
So you need to hook into the AJAX form submit and then run your JavaScript again?
Yes, I need to execute js code over the gravity form after submit the form if it have validation errors
Is possible to do this with gravity forms?
Sounds like this is what you are looking for:
http://www.gravityhelp.com/documentation/page/Gform_post_render