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