Possibly related to this topic:? Confirmation filter + Ajax = stuck
I'm trying to dynamically set the redirect url on my Ajax-enabled form - basically, its just a matter of adding field data to the query string, but it requires some server-side preprocessing so I can't just use the merge tags provided in the "Form Settings" dialog.
I have a function hooked on gform_confirmation
which adds the query string args I need to the $confirmation['redirect'] argument. However, it never gets called because the get_js_confirmation_redirect
function is called before the gform_confirmation
filters are applied.
I've worked around this by setting my form with a confirmation message, and having the entire confirmation url applied by the filter. However, it would make sense to move the gform_confirmation
filter above the function which performs the redirect for Ajax-enabled forms.