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.

Disable scrollTop - anyone got this to work?

  1. Hi All, I want to disable or overide the scrollTop that happens when a form fails validation. I've tried this: http://www.gravityhelp.com/forums/topic/scroll-to-top-of-page-or-maintain-position-on-form-subbmission
    and using a seperate call to scrollTop but no luck yet. Anyone managed to do this?

    Cheers, Ben

    Posted 13 years ago on Wednesday October 19, 2011 | Permalink
  2. Can you share a link to your form?

    Posted 13 years ago on Wednesday October 19, 2011 | Permalink
  3. Hi there,

    I know this is an old post but as it doesn't have an answer I thought it would better to post here and work out a solution instead of starting a new thread.

    I have a few forms which are AJAX submitted and I want to prevent the scolling that attempts to bring the #gforms_confirmation_message to the top of the page. This is mainly because in my case the page is short and it doesn't actually scroll to the top of the page.

    You can see an example here: http://goo.gl/7kxD3

    I can see that gForms is adding

    jQuery(document).scrollTop(jQuery('#gforms_confirmation_message').offset().top);

    to the source of the page. Can I tell it not to do this on specific forms on the site?

    Cheers,
    Alex

    Posted 12 years ago on Friday September 14, 2012 | Permalink
  4. Have you already tried the gform_confirmation_anchor filter?

    http://www.gravityhelp.com/documentation/page/Gform_confirmation_anchor

    Posted 12 years ago on Friday September 14, 2012 | Permalink
  5. Brilliant, thanks so much. That got me sorted straight out.

    Sorry I really wasn't sure where to look for it and didn't find any other forum posts about disabling it (or my search terms were off!).

    Cheers!

    Posted 12 years ago on Friday September 14, 2012 | Permalink
  6. Glad that worked for you.

    Posted 12 years ago on Friday September 14, 2012 | Permalink

This topic has been resolved and has been closed to new replies.