-
-
Save rutger1140/4994751 to your computer and use it in GitHub Desktop.
// Gravity Forms anchor - disable auto scrolling of forms | |
add_filter("gform_confirmation_anchor", create_function("","return false;")); |
Amazing! This was doing my head in. Thanks for sharing.
it's not working for me right. so bad
Works well!!! Woot woot!!!
Simpler version:
add_filter('gform_confirmation_anchor', '__return_false');
Works GREAT. I put this on first line of /wp-content/plugins/gravityformsquiz/class-gf-quiz.php
// Gravity Forms anchor - disable auto scrolling of forms
add_filter("gform_confirmation_anchor", create_function("","return false;"));
For anyone still finding this gist, you can disable the scrolling to anchor for a single form by entering the form ID. For example for form ID 5, you can use:
add_filter( 'gform_confirmation_anchor_5', '__return_false' );
You the man, what a headache :)
Worked great for me, thanks!
Thanks!
Thanks @kenanfallon
Thanks @kenanfallon
Thank you @lekkerduidelijk
Thank you @cfxd and @kenanfallon!
Thanks Its working for me
kenanfallon commented on Aug 3, 2015
Amazing its working perfect thanks
I'm new to this PHP and have been given a website project. How do I include this code? I've put it between php tags to no avail!
I've done a contact page on a separate php file which is called using the 'include' line and the page sends mail messages but after the submit button is clicked, the page flies up to the top.....
I'm new to this PHP and have been given a website project. How do I include this code? I've put it between php tags to no avail!
I've done a contact page on a separate php file which is called using the 'include' line and the page sends mail messages but after the submit button is clicked, the page flies up to the top.....
Put it in your functions.php
file and you should be good to go.
Source: http://www.gravityhelp.com/documentation/page/Gform_confirmation_anchor