Please test form at website footer
I have a custom Contact Form 7 for email address optin.
I created a custom confirmation thank you div via javascript that replace the place of the form.
The new v7.5.9 upgrade is now refreshing the page on every submit and my custom confirmation is not working.
Here is the form:
<div class="optWRAP">
<div class="mailICON"></div>
<div class="srchWRAP_ft">
<h2>Get Email Updates on New Shirts, Events, and Sales</h2>
<div class="fldWRP">
<div class="emailADDR">[email* kooraw id:email placeholder "enter email address"]</div>
[submit "Sign Me Up"]
</div>
<div class="disclaim">By signing up via email, you agree to receive periodical emails from KOORAW. Consent is not a condition of any purchase. View <a href="https://kooraw.com/terms">Terms</a> & <a href="https://kooraw.com/privacy">Privacy</a>. </div>
<div class="validTHK" style="display: none;">
<div class="thk">Thank you!</div>
<div class="thkTXT">We received your email, and we'll send you updates.</div>
</div>
</div>
</div>
Here is the javascript:
addEventListener('wpcf7mailsent', function(event) {
event.preventDefault();
document.querySelector('.fldWRP').style.display = 'none';
document.querySelector('.disclaim').style.display = 'none';
document.querySelector('.validTHK').style.display = 'block';
setTimeout(function() {
document.querySelector('.fldWRP').style.display = 'flex';
document.querySelector('.disclaim').style.display = 'flex';
document.querySelector('.validTHK').style.display = 'none';
}, 10000);
});
