Redirect Users After a Submission with Contact Form 7

Contact Form 7 is a versatile WordPress contact form and more secure method than basic PHP code. Below we cover how to redirect users to specific webpage after completing a contact form.

Redirect Useres

  1. Log into WordPress.
  2. On the left, press Contact Forms under Contact.
  3. In the Additional Settings tab, type the following, replacing with your preferred redirect URL:
     <script> document.addEventListener( 'wpcf7mailsent', function( event ) {     location = ''; }, false ); </script> 

    Press Save. The number beside Additional Settings matches the number of lines below.
    Add redirect code

To learn more about Contact Form 7, check out our guide on securing contact forms against spam.

Leave a Reply