WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Contact Form 7] Thank You Page (44 posts)

  1. webernir
    Member
    Posted 5 years ago #

    Hi.
    is there a way to redirect the user to a "thank you" page after the message sent?

    10x

  2. relish1227
    Member
    Posted 5 years ago #

    I am looking for the same thing....

  3. relish1227
    Member
    Posted 5 years ago #

    I found a way to make it work -- in the contact-form-7.js file...

    line 90:
    if (1 == data.mailSent) {
    jQuery(data.into).find('form').resetForm().clearForm();
    //wpcf7ResponseOutput.addClass('wpcf7-mail-sent-ok');
    window.location = "http://mysite.com/thank-you/";

    Instead of having it add the thank you response output, I redirect it to my thank you page.

    Definitely a hack, but does what I need it to do.

  4. djones101
    Member
    Posted 5 years ago #

    Anyone get this hack to work?

  5. djones101
    Member
    Posted 5 years ago #

    Relish1227....

    Does this hack not play nicely with certain plugins?

  6. col235
    Member
    Posted 5 years ago #

    I found this on the author's site. Haven't tried it myself, but they said it works:

    http://www.grapethinking.com/wordpress-contact-form-7-plugin-landing-pag

  7. djones101
    Member
    Posted 5 years ago #

    No dice. I get the same response with grapethinkings hack as I do with relish1227's hack. It ignores the site and goes directly ajax plug-in.

    If anyone gets it to work please let me know.

    Thanks

  8. tillisonm
    Member
    Posted 5 years ago #

    Relish's "hack" seems to work fine for me.
    I just upgraded to the latest version, if that makes any difference?

    Question though: does the .js get overwritten with the next upgrade. Apologies if that's a noob question, I'm no coder!

    Thanks Relish.

    Mark
    http://tillison.co.uk

  9. djones101
    Member
    Posted 5 years ago #

    Mark,

    What plugins are you using with your site. I am trying to figure out if there is some conflict going on when redirected.

    Thanks

    Dan

  10. djones101
    Member
    Posted 5 years ago #

    Tillisonm,

    What other plugins are you running…? I still can not get this hack to work

    I have these running:

    akismet
    all-in-one-seo-pack
    contact-form-7
    google-analyticator
    google-sitemap-generator
    tinymce-advanced
    wp-super-cache

    location.href=”http://www.xxx.com/thank-you-contact-form”;

    also does not work for me...

  11. djones101
    Member
    Posted 5 years ago #

    I had two instances of jquery appearing. It was blocking me from changing anything in the .js file. By default it was going to the .php file.

    Thanks for the help everyone.

  12. JL
    Member
    Posted 5 years ago #

    Nope, can't get it to work - not Relish's version or from grapethinking.com. Sure wish it would!

  13. djones101
    Member
    Posted 5 years ago #

    Hi,

    In the newest version of Contact Form 7 is there a way to do this? I am not the best with javascript, but it seems there should be a way to do it using "Additional Settings". Anyones know how?

    Thanks,

    Dan

  14. Matrakkas
    Member
    Posted 4 years ago #

    I am also interested in this.

    I tried both 'hacks' and I did not manage to get it working. It keeps showing the AJAX message even if I get rid of the line.

    Any idea?

    Thanks a lot

  15. markslatin
    Member
    Posted 4 years ago #

    I tried cutting and pasting the hack code into the .js file at line 90 (which happened to be the bottom of the form), then uploaded it to my site. Nothing at all changed.

    I'm a novice so I probably shouldn't be gambling in this area.

    I'd love to return the visitors to another page with a couple of PDF's as a thank you after they submit their email.

    Can you please HELP?

    Much thanks!

  16. wordpress_dude
    Member
    Posted 4 years ago #

    Put this in the Additional Settings field and it will redirect you to the page when the user clicks on the submit button.

    on_sent_ok: "location.replace('http://www.YOURSITE.com');"

  17. Dan Bollinger
    Member
    Posted 4 years ago #

    A fall-back option is to rewrite the "Your message was sent successfully. Thanks." message to something that you would have put on your Thank You page.

  18. brianlees
    Member
    Posted 4 years ago #

    The on_sent_ok worked perfectly for us!

  19. jrennard3
    Member
    Posted 4 years ago #

    I'm still unable to get the hacks or built in options to redirect my page. It sends and then displays the generic thank you message on the same page. How can I check if JQuery is actually running? It appears that it isn't hitting the the .JS file at all for settings.

    Thanks!

  20. brendanhibbert
    Member
    Posted 4 years ago #

    Likewise, I have tried both suggested 'hack's and neither worked. It seems as if the .js isn't making a difference -- However, it seems really elegant using the 'additional settings'

    Is any prefix needed prior to the:
    on_sent_ok: "location.replace('http://www.YOURSITE.com');"

    Hope we can resolve it -- it is a popular request.

    Cheers.

  21. dcloud
    Member
    Posted 4 years ago #

    You just make a thank you page, grab the URL of that page, and paste it into the “Additional Settings” box at the bottom of the Contact Form 7 settings screen like this ...

    on_sent_ok: “location.replace(’http://yourdomain.com/thank-you/’);”

    replace “yourdomain” with you own, of course.

  22. Coach Karl Ruegg
    Member
    Posted 4 years ago #

    Not working for me either.
    I would love to use this for my Google Adwords PPC conversion tracking.
    Any other ideas how to track conversions?
    Cheers!
    Karl

  23. kippiper
    Member
    Posted 4 years ago #

    The redirect is not working for me either:

    on_sent_ok: “location.replace(’http://yourdomain.com/thank-you/’);”

    I am running WordPress 2.8.5.

    Any other ideas? This is a requirement for my client who has an insurance site and the redirect must go to his agent page.

    I am unable to find any other plugins that allow both multiple forms and this possible setting.

    Any help is appreciated! Thanks so much!

    KIP

  24. Alexandre
    Member
    Posted 4 years ago #

    I'd really appreciate some help on this issue as well. Any ideas how to get the Additional Settings field to work with a "Thank You" page?

    Thanks everyone!

  25. S.K
    Member
    Posted 4 years ago #

    ajanini,

    I am not sure if you are still interested in this. But I have tested it and it works perfectly.

    All I did was to type the line of code instead of copy+paste since the web page rendering has curly quotes.

    And of course made sure that the intended landing page exists!

    HTH

    S.K

  26. Loter
    Member
    Posted 4 years ago #

    not working not working :(

  27. Loter
    Member
    Posted 4 years ago #

    I tried
    on_sent_ok:"location.replace(http://google.com);"

  28. Loter
    Member
    Posted 4 years ago #

    on_sent_ok:"location.replace('http://google.com');"
    Using wp 2.8.5 with latest forms7

  29. Takayuki Miyoshi
    Member
    Posted 4 years ago #

    It's just a javascript action hook, so obviously doesn't work if nothing calls it. Make sure that Contact Form 7's javascript is correctly loaded.

  30. Sunrise Fence
    Member
    Posted 4 years ago #

    C forms plug in lets you redirect to thank you page and is easy to use and you can easily insert the forms in a post or page. I am currently using contact form 7 and will need to redo my forms with cform so that I can track adword conversions on the thank you pages from multiple forms.

Topic Closed

This topic has been closed to new replies.

About this Topic