I am working with Google Re-Captcha and would like to enable the submit button once the Re-Captcha have been filled. I want to add a callback function to the Div class my code looks something like this:
<div class="input-field col s12">
{{ form.captcha.errors }}
<div data-callback="enableBtn"></div>
{{ form.captcha }}
</div>
This currently returns the data-callback outside of the form.captcha. How can I add the data-callback attribute to the form.captcha?
So for ex: If form.captcha is
<div class="g-recaptcha" data-sitekey="== xxxxxx =="></div>
Instead of having
<div class="g-recaptcha" data-sitekey="== xxxxxx ==" data-callback="enableBtn">
I have
<div data-callback="enableBtn">
<div class="g-recaptcha" data-sitekey="== xxxxxx =="></div>
enableBtnfunction called ?