I am using Gravity Forms for a one-page website I am developing: http://www.joshrodg.com/polio. There are two forms, both at the bottom of the page (Join and Contact).
I discovered some code that would enable anchors on the form –
add_filter("gform_confirmation_anchor", create_function("","return true;"));, so that after the form has been submitted the page scrolls back to the form position on the page – Gravity forms adds
#gf_2 to the form action so that it redirects to a specific anchor link (that is generated by gravity forms).
The problem I am having is the form redirects to odd places on the page when viewing on smaller screens. The Join form, gets redirected to the middle of the picture gallery and the Contact form gets redirected to the middle of the links section. I am guessing this is partly because of the way the sections are slanted on the page, but that’s just a guess.
I would like to fix the out of the box behavior (if possible), I may need to adjust something on my end. But, another idea I had was to use jQuery to find the specific form action id and change it to something else like
#contact (which would redirect to the titles of those sections), but I’m not entirely sure that would work either.
Does anyone have any ideas of what’s happening or a possible fix I could use to correct the behavior? – I’m not really sure the cause
Read more here: Gravity Forms returns to odd position