How to change g-recaptcha-response field name which is responded after validation

1,467 views
Skip to first unread message

anu...@cognam.com

unread,
Apr 13, 2016, 5:38:40 AM4/13/16
to reCAPTCHA
Hi Team,

Currently i am working on struts application where i had put reCaptcha version 2, I am facing incorrect form field name (g-recaptcha-response) because most of language does not support this type variable name("-" sign not allowed for variable name).

So my suggestion is that the name of response textarea "g-recaptcha-response"like   "g_recaptcha_response". or suggest us if any solutions available to do this.

regards
Anurag Kumar
8802339625

Seth Munroe

unread,
Apr 14, 2016, 9:29:57 AM4/14/16
to reCAPTCHA
These are just html form fields - not any programming language variable name. Form fields are allowed to have the "-" in their name.

The value should be in the request parameters coming into your page - but only once the user responds to the reCAPTCHA and submits the page. The field won't be available on the first request to display the page and it won't have a value if the user doesn't correctly answer the reCAPTCHA.

Anurag Kumar

unread,
Apr 15, 2016, 5:33:49 AM4/15/16
to reca...@googlegroups.com
hi,

if you are using @ModelAttribute  then form fields must be same as if you declared in POJO class to get/set data from request to object .

so in this case we can't create a variable with name "g-recaptcha-response".






Regards
Anurag Kumar

(Sr. Software Engineer)



--
You received this message because you are subscribed to a topic in the Google Groups "reCAPTCHA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/recaptcha/hkKvN5g-v0o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to recaptcha+...@googlegroups.com.
To post to this group, send email to reca...@googlegroups.com.
Visit this group at https://groups.google.com/group/recaptcha.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages