Subscribe to our newsletter

Enter your email address to subscribe to our newsletter.

Please wait...

Thanks for signing up.

You've subscribed and should start receiving the newsletter soon. You can unsubscribe any time using the link in the newsletter.

.then[2]json) => { if(json.success) { form_container.querySelector("input[name='ml_nonce']").value = json.data.ml_nonce;  … Continue reading.toString(); let validationError = false; Array.from(form_container.elements).forEach[3]input) => { if(input.type !== 'hidden') { if(input.required) { if(input.value == '') {  … Continue reading; }); fetch('https://www.taxwatchuk.org/wp-admin/admin-ajax.php', { method: 'POST', headers:{ 'Content-Type': 'application/x-www-form-urlencoded', }, body: data }) .then[4]response) => { fade.out(form_container.querySelector('.mailerlite-form-inputs'), () => {  … Continue reading; }); }) .catch((error) => { console.error('Error:', error); }); }); }, false); var fade = { out: function(el, fn = false) { var fadeOutEffect = setInterval(function () { if (!el.style.opacity) { el.style.opacity = 1; } if (el.style.opacity > 0) { el.style.opacity -= 0.1; } else { el.style.display = 'none'; clearInterval(fadeOutEffect); } }, 50); if( typeof (fn) == 'function') { fn(); } }, in: function(el) { var fadeInEffect = setInterval(function () { if (!el.style.opacity) { el.style.opacity = 0; } if (el.style.opacity < 1) { el.style.opacity = Number(el.style.opacity) + 0.1; } else { el.style.display = 'block'; clearInterval(fadeInEffect); } }, 50); } }

References

References
1 response) => response.json(
2 json) => { if(json.success) { form_container.querySelector("input[name='ml_nonce']").value = json.data.ml_nonce; submitButton.disabled = false; } }) .catch((error) => { console.error('Error:', error); }); form_container.addEventListener('submit', (e) => { e.preventDefault(); let data = new URLSearchParams(new FormData(form_container
3 input) => { if(input.type !== 'hidden') { if(input.required) { if(input.value == '') { validationError = true; if(input.nextElementSibling == null) { let error = document.createElement("span"); error.className = 'mailerlite-form-error'; error.textContent = validationMessages.required; input.after(error); } } } } }); if(validationError) { return false; } fade.out(form_container.querySelector('.mailerlite-subscribe-button-container'), () => { fade.in(form_container.querySelector('.mailerlite-form-loader'
4 response) => { fade.out(form_container.querySelector('.mailerlite-form-inputs'), () => { fade.in(form_container.querySelector('.mailerlite-form-response'