0

I'm using CF7 to send some information to my email and everything's working fine, but I need to redirect the users to a different page after the email has been sent, by default the forms are sent to the same page via ajax, I was thinking about setting a hidden field with the page url but since the form submits asynchronously I don't know how to set it in my page template. If the form was submitted normaly I'd do something like:

if (isset($_REQUEST['hidden_field_url']) {
    wp_redirect($_REQUEST['hidden_field_url']);
} 

So is there any way to send the form without ajax? Or maybe do what I need in any other way?

Thanks in advance!

closed as off-topic by birgire, kaiser Jul 28 '14 at 14:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

3

Got it, needed to add this to the additional settings option:

on_sent_ok: "location = 'http://www.url.com';"
2

In your jQuery AJAX call you should add some javascript to redirect the page:

window.location.replace("http://wordpress.stackexchange.com");

Not the answer you're looking for? Browse other questions tagged or ask your own question.