Multiple reCAPTCHA in one ASP.Net page

Can I add multiple reCAPTCHAS in one form? I tried to do this even by providing a few reCAPTCHAS identifiers, but when I load the page in a browser, only one of them is displayed.

Is it for design? I need two reCAPTCHAS, because one is for logging in, and the other is for the register form, which will be displayed on the same page.

Thank! Wt

+2
recaptcha
Jun 23 '09 at 18:50
source share
6 answers

Only one Cpatcha is supported on a page at any time. What you can do is use AJAX and lod captcha after loading the form.

It can help you .

+2
Jun 23 '09 at 18:56
source share

After a quick Google search, it seems like this is currently not possible. One of the suggestions I saw that you opened a modal recaptcha just like a user submits a form. ondemandcaptcha for Ruby .

+1
Jun 23 '09 at 18:54
source share

I originally headed this topic to believe that there is no easy answer, but after I digged the recaptcha ajax library, I can tell you that it is not! TL; DR, working jsfiddle: http://jsfiddle.net/Vanit/Qu6kn/

You can overwrite Recaptcha callbacks to do whatever you need with the call. You do not even need a proxy server, because with rewriting, the DOM code will not be executed. Call Recaptcha.reload () when you want to call callbacks again.

function doSomething(challenge){ $(':input[name=recaptcha_challenge_field]').val(challenge); $('img.recaptcha').attr('src', '//www.google.com/recaptcha/api/image?c='+challenge); } //Called on Recaptcha.reload() Recaptcha.finish_reload = function(challenge,b,c){ doSomething(challenge); } //Called on page load Recaptcha.challenge_callback = function(){ doSomething(RecaptchaState.challenge) } Recaptcha.create("YOUR_PUBLIC_KEY"); 
+1
Feb 17 '14 at 9:33
source share

Now this can be done with explicit creation of recaptcha. See my answer here:

How to show multiple recaptchas on one page?

+1
Jan 24 '15 at 2:08
source share

It’s not difficult to download each Recaptcha only if necessary using the Recaptcha AJAX API, see my post here:

How to show multiple recaptchas on one page?

0
Jun 07 2018-12-12T00:
source share

captcha has an img element of #recaptcha_challenge_image element, so after you set recaptcha to one div, say "regCaptch", get img src attr, set another divch html captcha to the old html, and then set #recaptcha_challenge_image src to src, which you get, here is a working example

  var reCaptcha_src = $('#recaptcha_challenge_image').attr('src'); $('#texo').html($('#regCaptch').html()); $('#recaptcha_challenge_image').attr('src',reCaptcha_src); 
0
Sep 14 '15 at 16:00
source share



All Articles