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.

Page jumps slightly on AJAX Submit

  1. If you click the "Stay Up-To-Date" tab in the upper right on this page:
    http://clients.freelancewebdesigner.com/tests/gravityforms/slide-out-forms/
    a div containing the Gravity Form will slide down:

    The embed code in my template is set to $ajax=true to avoid a full page refresh which would hide the form behind the tab again.

    Clicking the Subscribe button with $ajax=true though makes the page scroll (or jump) down just slightly which feels odd and doesn't seem like something that should be happening.

    Is there some way to prevent the page jump when clicking Subscribe?

    Posted 10 years ago on Friday May 17, 2013 | Permalink
  2. Maybe the form validation script is trying to anchor to something on the page, even though it's using AJAX?

    I should probably also mention this occurs in all browsers, and I'm using the latest GF and WP versions.

    Posted 10 years ago on Friday May 17, 2013 | Permalink
  3. Researching more I've found another thread suggesting AJAX submitted forms still require a page refresh which anchors down the page to the forms confirmation message by default, which I was not expecting.

    Issue resolved by adding this to my functions.php:
    add_filter("gform_confirmation_anchor_2", create_function("","return false;"));

    Posted 10 years ago on Saturday May 18, 2013 | Permalink