Ecommerce Shopify WordPress Discussion

Refresh Reset Contact Form 7 and DIV after submission, and after 10 seconds reset without page refresh

I created a Contact Form 7 that hides after validation and sent ("wpcf7mailsent") and displays a DIV with a thank you message. Everything works. BUT!! I want the form to refresh without page reload, and hide the Thank You DIV after 10 seconds. Can you show me the direction or how to achieve this? After 10 seconds I want the form to reappear blank and the thank you div is returned to "display:none" HTML: <div id="quote" class="qtWRP">[contact-form-7 id="9a5f5ae" title="Quote" html_name="quote" html_id="quote"]</div> <div id="qtWRP2" class="qtWRP2" style="display: none;"> <div class="thk">Thank you.</div> <div class="thk2">We received your TUBSAFE quote request, and a member from our team will contact to help you get started with your bathroom project.</div> </div> CSS: .qtWRP { width: 100%; display:flex; margin-top: 0px; padding: 20px; position:relative; } .qtWRP2 { width: 100%; margin-top: 0px; padding: 20px; } JAVASCRIPT: addEventListener('wpcf7mailsent', function(event) { event.preventDefault(); document.querySelector('.qtWRP').style.display = 'none'; document.querySelector('.cap').style.display = 'none'; document.querySelector('.qtWRP2').style.display = 'block'; });
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.