Skip to content

Commit

Permalink
Merge pull request #45 from MeetYourAI/yosh
Browse files Browse the repository at this point in the history
Yosh
  • Loading branch information
yoshinodev authored Sep 16, 2023
2 parents 278139b + 9ecf459 commit cf947f9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ <h2 class=" footer-col-title">contact information</h2>
if (response.ok) {
document.getElementById("successMessage").style.display = "block";
document.getElementById("errorMessage").style.display = "none";
form.reset();
document.getElementById("contact-us-form").reset();
} else {
response.json().then(data => {
if (Object.hasOwn(data, 'errors')) {
Expand All @@ -1193,13 +1193,7 @@ <h2 class=" footer-col-title">contact information</h2>
}

form.addEventListener(submitButton, handleSubmit)
submitButton.addEventListener("click", function () {
//only if the form is valid
if (form.checkValidity()) {
document.getElementById("contact-us-form").reset();
}

});


</script>

Expand Down

0 comments on commit cf947f9

Please sign in to comment.