• Resolved Bakkie

    (@eeuweb)


    Anybody who can help me with the new type of redirect? I tried adding

    <?php
    //Redirect to Thank you Page if page name is “contact”
    if ( is_page(‘contact’)) {
    ?>
    <script>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    location = ‘https://example.com/thank-you&#8217;;
    }, false );
    </script>
    <?php } ?>

    to the footer, but it breaks the website…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Bakkie

    (@eeuweb)

    aah figured it out.. it should be for example

    <script>
    document.addEventListener( ‘wpcf7submit’, function( event ) {
    if ( ‘1766’ == event.detail.contactFormId ) {
    location = ‘https://website/thanks/&#8217;;
    // do something productive
    }
    }, false );
    </script>

    Thread Starter Bakkie

    (@eeuweb)

    Damm just noticed i posted this on the wrong plugin page ?? I will close it

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with new redirect’ is closed to new replies.