I have a front page that is pretty long length-wise so I have enabled add_filter("gform_confirmation_anchor", create_function("","return true;"));
in my functions.php
file. This helps the Gravity Form return to form on validation or submission (which overrides the defaults which would normally just return you to the top of the page).
I am looking for a way to only execute this code on the front page...this is what I have tried (in my functions.php
file):
if (is_front_page()) {
add_filter("gform_confirmation_anchor", create_function("","return true;"));
}
But that continues to add the filter on every page...could anyone point me in the right direction?
Thanks,
Josh