Sanjay Yadav
Sanjay Yadav

Reputation: 241

WordPress contact form 7 redirection

I want redirect contact us form 7 , for different pages, I have multiple custom posts, and I want that when the user wants to read this, then first fill a form, and then redirect to full page. I want this process for every single post.

My test case can be seen here.

I am doing this:

on_sent_ok: "location.replace('http://polestarllp.com/casestudy/benefits-of-sql-on-hadoop/');"

But this is for only one page.

Upvotes: 0

Views: 1004

Answers (3)

user8711989
user8711989

Reputation:

For redirecting your contact form after submission . This is perfect method ,

on_sent_ok: "location.replace('http://polestarllp.com/casestudy/benefits-of-sql-on-hadoop/');"

But if you getting any issue then you can use redirection addon for contact us plugin .may be these link help you.

1:https://wordpress.org/plugins/tags/redirect-cf7/

2:https://github.com/anup04sust/Contact-Form-7-Redirect/blob/master/contact-form-7-redirect.php

3:https://github.com/kasparsd/contact-form-7-extras/blob/master/plugin.php

Upvotes: 0

Naveen
Naveen

Reputation: 198

If it doesn’t work, check if Ajax is correctly working on your site. follow this link http://contactform7.com/redirecting-to-another-url-after-submissions/

Upvotes: 1

R.K.Bhardwaj
R.K.Bhardwaj

Reputation: 2192

you need to call post id instead of this link ('http://polestarllp.com/casestudy/benefits-of-sql-on-hadoop/')

on_sent_ok: "location.replace('<a href="'. get_permalink($post->ID) . '"');"

hope it will work for you

Upvotes: 0

Related Questions