S
S
sorry_i_noob2018-10-03 22:14:42
reCAPTCHA
sorry_i_noob, 2018-10-03 22:14:42

ReCaptcha - how can I determine which captcha was solved?

I can have multiple captchas on a page. I want to make it so that when I try to submit the form, AJAX is triggered, checking if the form can be submitted or if a captcha needs to be solved. And if you need to solve it, then after solving it, the form would be sent automatically (after all, the "Submit" button has already been pressed).
I want to find out what captcha the user solved so that after solving it, go up to the nearest form (JQuery's closest function) and submit it. How can I do it? I added an attribute for my captchas:
data-callback="grecaptcha_success"
This is a function that is called after solving the captcha. But in this function, as I understand it, it is impossible to get the html node of the solved captcha. How then to get it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question