Uncaught Type Error on Invisible reCaptcha while Form Submit

test invisible recaptcha
invisible recaptcha demo
uncaught (in promise) null
recaptcha couldn t find user-provided function
invisible recaptcha server side validation
recaptcha v3
invisible recaptcha not working
react-google recaptcha

I'm trying to implement new invisible recaptcha by google.

But i have required inputs and should validate the form before recaptcha execute.

I got an error on recaptcha callback function like that:

Uncaught TypeError: document.getElementById() submit is not a function

So how can i submit the form after validate and recaptcha executed?


<script src="https://www.google.com/recaptcha/api.js" async defer></script>

<form id="form" action="?" method="post">
     Name: (required) <input id="field" name="field">
     <div id='recaptcha' class="g-recaptcha"
     <button id='submit'>submit</button>


function onSubmit(token) {
  alert('Thanks ' + document.getElementById('field').value + '!');
  document.getElementById('form').submit(); // This is error line

function validate(event) {
  if (!document.getElementById('field').value) {
    alert("Please enter your name.");
  } else {

function onload() {
  var element = document.getElementById('submit');
  element.onclick = validate;

JSFiddle: http://jsfiddle.net/dp1cLh28/6/

I found the solution.

Issue is button id named as submit (button id="submit") conflicting with .submit() function.

When i change the button id, it works!

Change the button id:

<button id='action'>Submit</button>
            ^ submit > action or whatever

Invisible reCAPTCHA, To invoke the invisible reCAPTCHA, you can either: the necessary JavaScript resource and add a few attributes to your html button. <form id='demo-form' action="? executed when reCAPTCHA encounters an error (usually network connectivity) and <input id='submit' type="submit" value="Submit"> one of our pages has two forms and one of them doesn’t show the invisible reCAPTCHA badge. If I “inspect” the page I get (This is in Chrome, I see it as well in Safari): Uncaught Error: reCAPTCHA has already been rendered in this element at Object.Gr [as render] (VM67 recaptcha__es.js:398) at (index):1331 at renderInvisibleReCaptcha

Check your domain whitelist

I had this error and could not solve it until I found out the error was that I simply had not added the correct domain to the domain whitelist.

The domain error does not appear on the console and I had not noticed the tab that displays the error on the page (below):

Uncaught (in promise) null with invisible recaptcha V2, <form method="POST" name="contact" class="formContact" id="formContact"> to work, when I press the button the first time I get this error: Uncaught (in promise​) null Uncaught TypeError: event.submit is not a function. Invisible reCAPTCHA Integration If you haven’t integrated your site with reCAPTCHA v2 , please follow our developer guide for implementation details. Please make sure that your site key that has been whitelisted for Invisible reCAPTCHA.

In my case, I had an input (type="submit") tag in the form instead of a button. The name of the input was conflicting with the submit function.

The solution was to give the input tag a name different from "submit":

<input type="submit" name="anything-except-submit">

I had to name the tag explicitly, because the name was defaulting to "submit" from the type attribute.

It is also important to note that the callback will only be called when the user successfully solves the reCAPTCHA, so if your callback is doing any form validation you must call


if the validation fails. That means that the user will have to solve the reCAPTCHA again, but otherwise he would not be able to submit the form after making corrections.

Form not submitted · Issue #91 · albertcht/invisible-recaptcha · GitHub, I've implemented this but my form is not submitted. Button type is submit. In console I am getting error "uncaught exception: null" The above is happening when I am clicking on Verify button in the captcha images. This page explains how to enable and customize the invisible reCAPTCHA on your webpage. To invoke the invisible reCAPTCHA, you can either: Automatically bind the challenge to a button or; Programmatically bind the challenge to a button or; Programmatically invoke the challenge; See Configurations to learn how to customize the invisible

Double form submit · Issue #33 · albertcht/invisible-recaptcha · GitHub, I have included recaptcha and trying submit form with ajax, but recaptcha ignore them and submit form with URL. Do you know how <button type="submit" class​="btn">Submit</button> When i submit form it's posting twice. Does error Uncaught ReferenceError: _submitEvent is not defined still exist? reCAPTCHA is a free service that protects your website from spam and abuse. reCAPTCHA uses an advanced risk analysis engine and adaptive challenges to keep automated software from engaging in

Quick Guide: How to Put Invisible reCaptcha on Your Website, How to add an Invisible reCaptcha to your website. but with invisible reCaptcha​, this happens when you submit the form (and the submission  If you are using reCAPTCHA on your site and you see the ERROR for site owner: Invalid key type message, this means that you are using an incorrect reCaptcha key type. For example, V3 keys are not compatible with V2 reCaptcha, and V2 keys are not compatible with Invisible reCaptcha.

Error during validation of your form submission [#3092703], But whenever I submit the form, I get the error: "There was an error during https​://developers.google.com/recaptcha/docs/faq#im-getting-an-uncaught-. Clarification Needed: When I configure for invisible captcha, score value keys or other way around, please make sure that you're reCAPTCHA type in  Hi guys, I am trying to implement validator with Google reCaptcha but I am getting an error: &quot;Uncaught TypeError: Cannot read property &#39;nodeType&#39; of undefined&quot; When implementing &