First of all, I believe that this tip I’m writing on this post is not necessary for 99.99% of users and, actually, I don’t recommend using it. I’m writing this for the 0.01% of you, so you can ignore it if not necessary.
As you know, Contact Form 7 redirects to the same URL as the form’s URL after form submissions in the default settings. However, in very rare cases, you might need to change this to make it redirect to another URL after submissions. I’ll write in this post how you can set up Contact Form 7 to do just that.
By the way, I’m often asked by users that how they can redirect to so-called “Thank You Page”. In most cases, they want to know it because they assume that redirecting to “Thank You Page” is necessary for tracking form submissions with Google Analytics. That’s not necessary at all. In fact, it’s an outdated and nonsense custom. Today you can track submissions with Google Analytics without any redirection.
So you have other reason for redirecting to another URL? Okay. I’ll show you the procedure.
The simplest way is using
on_sent_ok: "location = 'http://example.com/';"
Obviously, you need to replace the http://example.com/ to the URL you want to redirect to.
That’s it. So simple, isn’t it? Try it and check if it works.