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