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 Confirmation Anchor (Revisit)

  1. @Alex thanks for the quick response. But I wish you didn't close the thread so quickly. I think there is a bug within the hook unless I am missing something. I ment to post that I tried a return false before you posted your response.

    Am I misunderstanding how the hook should work. My assumption is that it SHOULD NOT jump to the form container if I am placing your example but it still does. Are there any other requirements. Basically I have a form in the middle of my viewable area and it it automatically jumping to the form. It wouldn't be so bad but it puts the scroll position as if the form is at top:0 so it just ends up being confusing to a user.

    Sorry to make a new thread. Just seemed to jump the gun there on the topic close.

    Posted 12 years ago on Tuesday September 27, 2011 | Permalink
  2. I'll have one of our developers take a look at this and see if they can recreate the issue. What version of Gravity Forms are you using?

    Posted 12 years ago on Tuesday September 27, 2011 | Permalink
  3. @Carl We're using 1.5.3 for this project. Thanks for taking a look at it for us.

    Posted 12 years ago on Tuesday September 27, 2011 | Permalink
  4. Hi Aaron,

    I installed v1.5.3 to test this and was unable to recreate this issue. By default, the confirmation anchor will not be active for single page forms; however, for multi-page forms, it will. Using the following snippet I was able to deactivate the confirmation anchor for multi-page forms.

    add_filter('gform_confirmation_anchor', '__return_false');

    If this does not work for you, could you post a link to your form so we can take a look?

    Posted 12 years ago on Wednesday September 28, 2011 | Permalink
  5. Here is a screen shot of the form. I can't share the link yet as it's on a development server right now.

    In the screen shot is the end result after you submit the form. It automatically scrolls to the top of the form on submit. Maybe I'm misinterpreting how confirmation anchor works. But basically I don't want the form submission to scroll the browser at all. This is an ajax enabled form.

    I tried adding the code above to my functions.php file, but still got the same result.

    Is there any other advice or information you can give on how to get this working properly?

    Posted 12 years ago on Wednesday October 5, 2011 | Permalink
  6. Hi Aaron,

    Just sent you an email. For others with this issue, here is a review:

    AJAX-enabled forms always scroll to the top of the form wrapper and this functionality is unaffected by the "gform_confirmation_anchor" filter. We agree this can sometimes lead to undesired behavior.

    As of GF v1.6.rc5, AJAX-enabled forms will still scroll to the top of the form wrapper by default; however, this functionality can now be affected by the "gform_confirmation_anchor" filter. Additionally, the functionality of this filter has been improved for AJAX forms so in addition to return a true or false value to enable/disable scrolling to the anchor, you can also return an integer to scroll a specific number of pixels from the top of the page.

    Posted 12 years ago on Thursday October 6, 2011 | Permalink

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