PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Way to detect validation error

  1. We have some php that we need to run if form validation has detected errors, however I can't find any piece of data or hook that will let us know that there was an error. The Gform pre render hook looked to be hopeful, but the Form Object that it has access to does not have any specific piece of data saying that validation failed.

    Is there anyway to know this?

    Our form is on a de-activated tab when the page loads, and if there is an error I need to be able to activate it. I was able to use the gform_pre_submission hook to activate it after a successful submision, but not if there is an error.

    thanks!

    Posted 13 years ago on Friday March 25, 2011 | Permalink
  2. You could get around this by turning on AJAX, and then the page won't refresh when the form is submitted so you won't have to use code to activate the Tab. AJAX is an option when using the Insert Form wizard to insert the shortcode and can also be used when calling a form via a function call. Documentation covers both scenarios.

    Posted 13 years ago on Friday March 25, 2011 | Permalink