WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Not redirecting to ThankYou page (8 posts)

  1. Rema999
    Member
    Posted 2 years ago #

    Hello there
    I installed CF7 and I'd like to track submissions on AdWords.

    Following the instructions given here [ http://contactform7.com/blog/2010/03/27/redirecting-to-another-url-after-submissions/ ] i added the following code in the additional settings of CF7:

    on_sent_ok: "location = 'http://example.com/';"

    (of course i changed "example.com" with the correct URL I created)

    Problem is the form is working correctly and sends emails just fine, but it won't redirect to the thank you page.

    Anyone can help me figuring out what the problem is?

    Thanks a lot!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Pickleburp
    Member
    Posted 2 years ago #

    I'm having a similar issue with a client's site. It's running CF7 3.0.1 on WP 3.1 (haven't made the upgrade yet).

    I've tried putting *anything* in the additional settings dialogue and no luck. I've tried "location = ," "location.replace," and even just a simple alert - on_sent_ok: "alert('Bananas!');" Not even that functions.

    Page validates, no JS errors visible in Firebug or Web Developer toolbar. Ultimately I'd actually like to run a little jQuery that will show a built-in "Thank you!" box instead of the form with the thank you message at the bottom, but I need to figure out why its not accepting the script I'm putting in first.

    Browsers: Firefox 8, Chrome 15, IE9 tested so far.

    Any suggestions are appreciated.

  3. Pickleburp
    Member
    Posted 2 years ago #

    I should add that my form validates, sends, and is received successfully. It just won't process anything from "Additional Settings" on CF7.

  4. sandeshj
    Member
    Posted 2 years ago #

    I have the same problem. It worked fine from April '11 to until recently - it has suddenly stopped working and I haven't made any website changes! I want to track Google Adwords conversion - is there an alternative to tracking it without re-directing to another page?

  5. Rema999
    Member
    Posted 2 years ago #

    I'm sorry no one could help yet.

    I have the same issues as Pickleburp: page validates, no JS errors visible in Firebug or Web Developer toolbar.

    I'm using WP 3.2 and Firefox 8

    Still hoping to find out why this happens...
    Thanks!

  6. sandeshj
    Member
    Posted 2 years ago #

    In my case it turned out that call to wp_footer was missing in the footer - that fixed my issue.

  7. viral2583
    Member
    Posted 1 year ago #

    GUS Solution is here and very simple..

    1. Open this below file
    wp-content\plugins\contact-form-7\includes\controller.php

    2. Find the function function wpcf7_process_nonajax_submitting()

    3. Find the line } elseif ( $wpcf7_contact_form->mail() ) {

    4. Copy below code
    header("Location: ".home_url( '/' )."/thank-you");
    exit;

    5. Paste it after this line:
    $wpcf7_contact_form->clear_post();

    Thank you,
    Viral Shah
    viral.shah@maven-infotech.com
    http://www.maven-infotech.com

  8. QuentinWeber
    Member
    Posted 1 year ago #

    controller.php does not contain any of this

    I have been trying for a week to fix redirect problem

    standard code in additional settings box doesn't work

    have correct code in header and footer as per other forum advice

    not sire where to from here

    check out http://sharlenepoole.com/bookings-enquiries/

    any help would be appreciated

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic