Answer the question
In order to leave comments, you need to log in
How to insert multiple reCAPTCHAs on one page?
I'm using RoR 4.2.0 in the project gem 'recaptcha'
https://github.com/google/ReCAPTCHA
This captcha works great. But there is one place in the program where it does not work out as I would like. There is a comment form and a complaint form on the blog post page. I wanted to insert a captcha into each form. But it turns out that the captcha is present once per page. A similar question has already been asked: How to install multiple forms with reCAPTCHA on one page? There was no answer. I think it's redundant to provide code. There are two partials, each of which calls: Has <%= recaptcha_tags %>
anyone had similar questions? Who got around the situation? Thank you.
Answer the question
In order to leave comments, you need to log in
There can only be one reCaptcha per page at a time.
stackoverflow.com/questions/1034427/multiple-recap...
https://groups.google.com/forum/#!topic/recaptcha/...
I decided a little differently: after entering the inputs and clicking "submit", a captcha confirmation window appears, which in turn jumps from form to form through the script. as a result, we have one captcha for all forms, and a nice, not overloaded interface, especially for mobile versions of sites
Correspondence with the author of the gem:
me
Hi! I use your gem in my RoR app.
Recaptcha works well. But when I try to add more than one Recaptcha on different forms at single page - I see only one of them.
I try get 2 Recaptha for my syte at Google:
at first form:
recaptcha_tags :public_key => Rails.application.secrets.recapcha_public_key
at second form:
recaptcha_tags :public_key => Rails.application.secrets.recapcha_public_key2
It doesn't help me.
How can I fix it? thanks
Are you able to put two recaptcha on the page even without the gem, just manually? I'm not sure it's a problem with the gem.
—
Jason L Perry
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question