Invisible reCAPTCHA Example Does Not Submit Form

3,097 views
Skip to first unread message

sman...@brevardmusic.org

unread,
Mar 12, 2017, 2:02:02 PM3/12/17
to reCAPTCHA
I have been testing the example code in the "Invoking the invisible reCAPTCHA challenge after client side validation" section of the developer page (https://developers.google.com/recaptcha/docs/invisible).  The validation works, but the form does not get submitted.  I named the form and altered the onSubmit function to submit it, but it fails to submit every time.  I think the grecaptcha.execute() function is altering the form so it can't be submitted, but I can't figure out how to get past that.  Any help would be greatly appreciated!

sman...@brevardmusic.org

unread,
Mar 12, 2017, 6:05:56 PM3/12/17
to reCAPTCHA
Figured this out and wanted to post it in case anyone else has the same issue.  Google's example code set's the button id as "submit" and calling the "submit" function from within onSubmit was failing because of it.  Changing the id to anything else fixed it.

Lokesh Das

unread,
Apr 25, 2017, 6:24:29 AM4/25/17
to reCAPTCHA
Great solution.

infostr...@gmail.com

unread,
Jun 7, 2017, 3:27:49 AM6/7/17
to reCAPTCHA
Thank you so much for posting this.  Struggled whole night with this.


On Monday, March 13, 2017 at 3:35:56 AM UTC+5:30, sman...@brevardmusic.org wrote:
Reply all
Reply to author
Forward
0 new messages