This commit is contained in:
2025-08-26 00:45:59 -05:00
parent 599b53527e
commit 3bc28dc5e6

View File

@@ -62,15 +62,15 @@ form.addEventListener("submit", function(event) {
const phone = document.getElementById("phone").value.trim();
const contactMethod = document.querySelector('input[name="contact-method"]:checked')?.value;
const message = document.getElementById("message").value.trim();
const privacyAccepted = form.querySelector('#privacy-policy').checked;
const privacyAccepted = getElementById("privacy-policy").checked;
let hasErrors = false;
// Validation logic...
if (!privacyAccepted) {
showMessage("Privacy Policy must be accepted before submitting.");
hasErrors = true;
}
//if (!privacyAccepted) {
// showMessage("Privacy Policy must be accepted before submitting.");
// hasErrors = true;
//}
if (!firstName) {
showError("first-name", "Please enter your first name.");