Testing

Form with Webhook and reCAPTCHA


function recaptchaCallback() {
// This function will be called when reCAPTCHA is successfully completed
document.getElementById(“myForm”).submit(); // Submit the form
}

document.getElementById(“myForm”).addEventListener(“submit”, function(event) {
var response = grecaptcha.getResponse();

if (response.length === 0) {
// If reCAPTCHA is not completed, prevent form submission
alert(“Please complete the reCAPTCHA.”);
event.preventDefault();
}
});