Name Email Submit function onSubmitForm(event) { // Allow for client validation to happen before the recaptcha // Here we are just using HTML5 built-in form validation grecaptcha.execute(); // Important to prevent the form from submitting on it's own event.preventDefault(); } function recaptchaOnSubmit(token) { // Now submit the form // Or instead of the line below, you can post the form using fetch or XHR. document.