WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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']) {

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

Thanks in advance!

share|improve this question

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.

up vote 3 down vote accepted

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

on_sent_ok: "location = 'http://www.url.com';"
share|improve this answer

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

share|improve this answer
Got it, I posted it as and answer below. – javiervd Apr 9 '11 at 21:21

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