Description
Use this filter to enable or disable the confirmation anchor functionality that automatically scrolls the page to the confirmation text or validation message upon submission. This also takes effect when browsing between pages of a multi-page form. The page may also be forced to scroll to a specified distance (pixel) from the top of the page. This hook is useful when embedding forms in a long page.
When the anchor exists, the page scrolls to the top of the form. For non-AJAX forms without the anchor, the page remains at the top of the page upon reload. For AJAX forms without the anchor, the page will not move when the form content is updated. Depending on the page layout, padding and margin changes associated with displaying validation errors may make it appear that the page has scrolled.
When the anchor is set to true, the following HTML is added before the opening form tag.
When true, the bookmark for the anchor (#gf_80 in this example) is also added to the action on the form tag.