Redirect page after submitting contact form 7

If you want to redirect the page after the web form submission. Then you can do it easily by adding the JavaScript code in header.php Or footer.php.


<script type="text/javascript">
document.addEventListener( 'wpcf7mailsent', function( event ) {
    location = '/thank-you/';
}, false );
</script>

Also if you want a different page for a specific contact form (ID=123) after submission, then you can add the following code.


<script type="text/javascript">
document.addEventListener( 'wpcf7mailsent', function( event ) {
    if ( '590' == event.detail.contactFormId ) {
        location = '/quote-thank-you/';
    }
}, false );
</script>