Skip to main content
Inspiring
Jan 14, 2016 3:54 PM UTC
Answered

Cant get Google Recaptcha to work

I have a form using Google Recaptcha but when I submit it and dump out the form on the success page I can see the G-RECAPTCHA-RESPONSE value but if I try to do anything with it I get a 'Variable G is undefined' error message.

Is that not the correct way to use the response or is there a better way to get the recaptcha to work?

Cheers!

This topic is closed to new replies. Start a new post to keep the conversation going.
partTimeCrazyCorrect answer
Inspiring
Jan 15, 2016 8:18 AM UTC

its ok i think i worked out the problem I just had to set it to be FORM["g-recaptcha-response"] and it works. Thanks anyway!

3 replies

WolfShade
Legend
Jan 14, 2016 9:10 PM UTC

Without seeing any code that you've done, so far, it's difficult (at best) to know what is causing any issue.

Personally, I try to avoid third-party CAPTCHAs and build my own, so I don't know how much help I can offer (I've never used Recaptcha), but I'm more than happy to make the attempt.  Please post your form code (don't forget to use highlight) and the processing code that is kicking out the error.

V/r,

^_^

Translate
partTimeCrazyAuthorCorrect answer
Inspiring
Jan 15, 2016 8:18 AM UTC

its ok i think i worked out the problem I just had to set it to be FORM["g-recaptcha-response"] and it works. Thanks anyway!

Translate
Clever Spider
Participant
Oct 6, 2016 4:23 PM UTC

I was getting the same error, but when I try to apply your fix I get a new error:

Element g-recaptcha-response is undefined in a Java object of type class coldfusion.filter.FormScope

Any suggestions?

Translate