fix: change privacy policy field validation strictly to browser validation
This commit is contained in:
@@ -121,9 +121,9 @@ pageScripts:
|
||||
type="checkbox"
|
||||
id="privacy-policy"
|
||||
name="privacy-policy"
|
||||
required
|
||||
aria-required="true"
|
||||
aria-describedby="privacy-policy-description"
|
||||
>
|
||||
aria-describedby="privacy-policy-description">
|
||||
<label id="privacy-policy-label" for="privacy-policy">
|
||||
I agree to the site's
|
||||
<a href="/privacy-policy" target="_blank" rel="noopener noreferrer">Privacy Policy</a>.<span class="req-ask">*</span>
|
||||
|
@@ -62,7 +62,6 @@ 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 = document.getElementById("privacy-policy").checked;
|
||||
|
||||
let hasErrors = false;
|
||||
|
||||
@@ -124,7 +123,6 @@ form.addEventListener("submit", function(event) {
|
||||
message: message,
|
||||
url: honeypotField,
|
||||
hCaptchaResponse: hCaptchaResponse,
|
||||
privacyAccepted: privacyAccepted
|
||||
};
|
||||
|
||||
// Send the data to the backend using fetch()
|
||||
|
Reference in New Issue
Block a user