Hi,
I've been using the gform_pre_submission_filter to programatically alter my redirects (I got tired of having to manually alter the URL after multiple location changes, so I have a function that replaces the old directory with the new one, among other things).
As of the latest update, my function is still being called, but the url does not appear to be setting.
I can't link to the site as it is a confidential project, but the gist of the function is:
add_filter("gform_pre_submission_filter", "custom_confirmation", 10, 4);
function custom_confirmation($form){
$redir = $form["confirmation"]["url"];
$redir_new = str_replace("old-domain.com","new-domain.com",$redir);
$form["confirmation"]["url"] = $redir_new;
return $form;
}
I have debugged the function itself and it is being called and properly constructing the new URL. But the URL manually added in the form is what is now being called, wrecking most of the form functionality on my prototype.
I imagine this has to do with the new ability to configure conditional redirects, but debugging the form object isn't revealing how. Can you please let me know if I need to change filters etc?
Thanks,
Katharine