Ravindra S. Rathore
Ravindra S. Rathore

Reputation: 121

How to call google recaptcha multiple times on same page and in a single form

I want load google recaptcha on page load and load another one when user click on reply button.

Upvotes: 0

Views: 2485

Answers (1)

Tom Mettam
Tom Mettam

Reputation: 2973

You just need to call:

grecaptcha.reset();

from Javascript in order to reset the captcha. So, you could do something like this:

<script>

  function reply()
  {
    grecaptcha.reset();
    //do whatever else you need on reply
  }

</script>

<button onclick="reply()">Reply</button>

Upvotes: 2

Related Questions