Skip to content

Instantly share code, notes, and snippets.

@anneallen
Created October 7, 2015 18:21
Show Gist options
  • Save anneallen/4a3c90b48c0c40b39349 to your computer and use it in GitHub Desktop.
Save anneallen/4a3c90b48c0c40b39349 to your computer and use it in GitHub Desktop.
Add filter to Gravity forms to return to form top (not page top) when validation errors are present
//Gravity forms - keep form visible if validation problems
add_filter("gform_confirmation_anchor", create_function("","return true;"));
@anneallen
Copy link
Author

Useful when the form is long and/or the page is long - validation error returns to top of the page, leaving the form validation error message out of site - users get confused and think a form has been submitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment