[Tutorials] Redirect contact form 7 to thank you page

chuyen-huong-contact-form7-sang-trang-cam-on

If you are using CF7 to collect customer information, by default, after you fill out the form and click the submit button, a successful form submission message will appear. However, sometimes for some reason you want after successful registration it goes to another page like a thank you page to upsell other products or to track conversions, for example.

[Tutorials] Redirect contact form 7 to thank you page

Redirect contact form 7 to thank you page
Redirect contact form 7 to thank you page

Step 1: Create a Thank you page

Create a thank you page or a custom product upsell page of your choice. Go to Page > Add new page and edit with UX Builder

Step 2: Customize the redirect code

Copy and paste the following code into Footer Scripts! (Flatsome > Advanced > Global settings > Footer Scripts)

<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
location = 'http://example.com/';
}, false );
</script>

Replace http://example.com/ = page link that you created in step 1!

Trả lời

Email của bạn sẽ không được hiển thị công khai.