Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent reCaptcha multiple image selections

Tags:

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.

like image 781
JuniorDev Avatar asked Apr 20 '15 11:04

JuniorDev


People also ask

Can I customize reCAPTCHA?

Custom theming allows you to control exactly how the reCAPTCHA image appears. (Here is a demo of custom theming.) In order to use custom theming, you must first set the theme property of the RecaptchaOptions to 'custom'. This tells reCAPTCHA that it should not create a user interface of its own.

Can I run reCAPTCHA v2 and v3 on the same page?

Yes, you can use both reCAPTCHA (non-Enterprise version) and reCAPTCHA Enterprise. Typically the third party solution asks for your public key and either your secret key or your API key.


1 Answers

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

like image 133
Markus Avatar answered Nov 19 '22 21:11

Markus