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.

On Form Submit Scrolls below confirmation/error message

  1. Hello,
    I purchased Gravity Forms today and have a few questions:

    1) Scrolls past confirmation and error message on submit. I am using AJAX and when i submit or have an error it will scroll past the form field and error message. So after you submit if you are at the top of the page it will scroll to under where the form is and you cant see the confirmation message.

    I want to DISABLE all scrolling so when they submit it stays at the area and then fades the confirmation message in.

    Also I am looking at using the forms in my template files, I was planning on just taking the html code that is generated by gravity forms and editing it that way. Is there an easier or better method for that?

    Also I have tried http://www.gravityhelp.com/forums/topic/gravityforms-scrolls-page-to-form-on-ajax-submit already and it didnt change the anchor spot at all, I had it set to top and it still scrolled down past the confirmation message.

    Thanks
    Dave

    Posted 12 years ago on Wednesday November 7, 2012 | Permalink
  2. I wrote this up for multi-page forms, so this solution is likely more complex than you need:
    http://www.gravityhelp.com/forums/topic/how-to-manage-page-breaks-to-go-to-top-of-page#post-69987

    But you can scroll the page to the top whenever you need to using jQuery.

    Or, there is the gform_confirmation_anchor filter which you can use to scroll to some position or disable the scrolling altogether: http://www.gravityhelp.com/documentation/page/Gform_confirmation_anchor

    For your second question, do not copy the rendered HTML. To embed a form in a template file, use the function call method of embedding the form.

    http://www.gravityhelp.com/documentation/page/Embedding_A_Form#Function_Call

    Be sure to read all the way to the bottom to learn how to load the scripts and styles required by Gravity Forms when you embed your form this way.

    Posted 12 years ago on Thursday November 8, 2012 | Permalink