Prevent reCaptcha multiple image selections

2019-03-23 09:28发布

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.

标签: recaptcha
1条回答
太酷不给撩
2楼-- · 2019-03-23 10:08

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..

查看更多
登录 后发表回答