Don’t fill this out if you're human: What is your name? * What is your email address? * Why are you contacting me? * const handleSubmit = (e) = { e.preventDefault() let contactForm = document.getElementById('contactForm'); let formData = new FormData(contactForm) fetch('/', { method: 'POST', headers: {"Content-Type": "application/x-www-form-urlencoded"}, body: new URLSearchParams(formData).toString() }).then(() = { console.log('Form successfully submitted'); let submitButton = document.querySelector('input[type="submit"]'); submitButton.value = 'Sent, Thank you'; window.location.href = "/contact-success"; }).catch((error) = alert(error)) } document.querySelector("form").addEventListener("submit", handleSubmit);