From e5c8406542ae5eb7dabf8db49c673f7efd228a01 Mon Sep 17 00:00:00 2001 From: Isaac Teng <60546250+IsaacTeng@users.noreply.github.com> Date: Thu, 4 Apr 2024 17:43:05 +0100 Subject: [PATCH] Update contact.html --- contact.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contact.html b/contact.html index df7453a..d42b5f0 100644 --- a/contact.html +++ b/contact.html @@ -55,7 +55,7 @@
- +
@@ -70,8 +70,13 @@ document.getElementById("mySidebar").style.display = "none"; } -$(window).load(function() { -$('form').children('input:not(#submit)').val('') +function submitForm() { + // Get the first form with the name + // Hopefully there is only one, but there are more, select the correct index + var frm = document.getElementsByName('contact-form')[0]; + frm.submit(); // Submit + frm.reset(); // Reset + return false; // Prevent page refresh }