简体   繁体   中英

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.

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/

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM