jerryh0707
Member
Posted 2 years ago #
Is there a way to easily route a user to a webpage upon submission of a contact form? For example, if I wanted to offer a download or a special deal on a page, but wanted to capture their email address and name first, then send them to that destination page.
As what it provides is basic mail form, I don't think Contact Form 7 is suitable for your idea.
Why not sending email reply with the URL manually to contacting users?
Or, if you know javascript, you could achieve it by using new on_sent_ok hook.
http://ideasilo.wordpress.com/2009/05/31/contact-form-7-1-10/
djones101
Member
Posted 2 years ago #
Could you post an example of how this would work?
This does not work:
on_sent_ok: "location.href=”http://www.domain.com/next-page”;"
Any help would be great!
Thanks,
Dan
djones101
Member
Posted 2 years ago #
Could you post an example of how this would work?
This does not work:
on_sent_ok: "location.href=”http://www.domain.com/next-page”;"
Any help would be great!
Thanks,
Dan
Philip Jones
Member
Posted 2 years ago #
I suspect you are having problems because of the extra speech marks. Change the inner " to ' like this:
on_sent_ok: "window.location='http://www.domain.com/nextpage';"
kfrost1196
Member
Posted 2 years ago #
I'm having a similar problem. I need to link to a different page after submit, and everything I read is telling me I'm doing it correctly. But nothing is working. Here is my code:
on_sent_ok: “location.replace(’http://www.nightmareon13th.com/coupon.html’);”
I must be missing something, does anyone have any ideas?