I have a form that resides at the bottom of my page. I am using WordPress and a plugin called Gravity Forms. After I submit the form at the bottom of my home page within the footer div and errors are found it goes to the top of the page and the errors can no longer be seen. This causes an issue with usability. Can someone please tell me how to keep the page at the current position after form is submitted ? The form is using ajax to check for errors.
Leave a Reply
You must be logged in to post a comment.
I know this is an older post, but just in case anyone is searching for a solution like I was… GravityForms includes a function for this exact reason. To prevent all of your forms from reloading and jumping to the top of the page, simply use the following
You can find the topic here http://www.gravityhelp.com/documentation/page/Gform_confirmation_anchor
Use either return false; or e.preventDefault();
Here’s a link to an article which discusses each method
Simple way: I change the ID of the form, so Javascript of Gravity form can not remove the form.
Also, do something after saving: