Contact Form 7 WordPress Tutorial

Contact Form 7 WordPress Tutorial Submit Button Redirect

This WordPress tutorial explains how to add a redirect to the submit button with Contact Form 7

Contact Form 7 is one of the most widely used contact form plugins in the WordPress universe. Its simple design layout allows for great customizations but for the beginner this can be a tedious process. Today we focus on a task that should be easy, but has given many trouble. How does one redirect the “Submit” button to another page? Lets understand why a contact form would need to do this in the first place.

Contact forms gather information from a potential client and delivers a leads to the business. Many times the business would like to thank the client for filling out the form, after all this will lead to future contacts. The submit button will redirect the client to a thank you page. This can come in handy when the performance of the contact form a tracking code can be inserted into the thank you page. This ensures only the successful click of the submit button get tracked not other web site traffic.

Well lets get down to it.

1. Click the contact form you have been working on under the contact tab.

2. Scroll down to the heading “Additional Settings”.

3. Insert this code on_sent_ok: “location.replace(‘http://yourdomain.com/’);”

That’s it. Now the submit button will redirect to the page of your choice.

This screenshot shows exactly where it goes.

WordPress Tutorial

Screenshot showing submit button redirect

This WordPress tutorial is brought to you by Silvernail Web Design.

Let our WordPress Services Deliver Results

WordPress Web Site Design, SEO Optimization, Content Marketing and Social Media Management

Don Silvernail

When you love what you do for a living, it's not work. I love Designing WordPress Websites and crafting unique Content Marketing Strategies for my Clients. I am also a Fishing Enthusiast, avid Gamer, and most recently... I bought a Jeep and joined the Jeep Wrangler Club. If you see me on the road, don't forget to wave!

Click Here to Leave a Comment Below

Shawn Sproul - June 9, 2014

This is not working for me. I have tried in numerous browsers. I have searched for hours on how to implement this and everyone states the same thing, but it does not work. I still stay on same page, and just see my message which is entered into the Successful Send entry within Contact Form 7 admin panel.

This should be a straightforward process, as most everyone would want this to function that way?

Why so difficult just to get a damn button to redirect to a new page.

Reply
    thrive themes - June 9, 2014

    Hi Shawn,

    I would live to help you with this. Email me a screenshot if your additional settings box to don@silvernailwebdesign.com I’m sure it’s something simple

    Reply
Ron Noble - October 3, 2017

I am working on a site that has 2 submit buttons on one page I need to redirect to two different URL’s depending on which button is depressed. any help would be most appreciated.

Reply
    Don Silvernail - October 10, 2017

    Follow the instructions above for both submit buttons.
    1. Click the contact form you have been working on under the contact tab.
    2. Scroll down to the heading “Additional Settings”.
    3. Insert this code on_sent_ok: “location.replace(‘http://yourdomain.com/’);”
    That’s it. Now the submit button will redirect to the page of your choice.

    Reply
Leave a Reply: