Prevent reCaptcha multiple image selections

2019-03-23 09:39发布

问题:

I'm using Google reCaptcha for validation purposes on a client website. Today I've got a complaint/change-request from them, regarding the multiple image selection (Select 2 beers, wines, cakes etc.) validation of reCaptcha. My client thinks it's inappropriate to having their customers choose from alcoholic beverages because of socio-cultural standing of their customer base.

Long story short; is there a way to customize Google reCaptcha to only show number/letter based validation when "I'm not a robot" option fails.

回答1:

I think I found a solution. The official documentation contains information about a fallback mechanism for environments that do not support the reCaptcha checkbox widget.

By appending the parameter fallback=true you can explicitly use the fallback.

I haven't had any beer or wine reCaptchas yet since I've been using the fallback. (But still cake, sushi or road-sign reCaptchas)

Try the following:

<script src='https://www.google.com/recaptcha/api.js?fallback=true'></script>

EDIT: But the usability of the fallback widget is just horrible..



标签: recaptcha