Google reCaptcha keeps loading forever
your problem is:
<div class="g-recaptcha" data-theme="light"></div>
you are missing attribute. the correct will be:
<script src='https://www.google.com/recaptcha/api.js'></script>
<div class="g-recaptcha" data-sitekey="your_google_public_key"></div>
You hav create data-sitekey before use google captcha.
read more at https://developers.google.com/recaptcha/docs/display and https://www.google.com/recaptcha/admin#createsite
Actually I found the answer. The captcha was loading inside a modal popup div. When this popup loaded, it would change the div's parent and that somehow broke the captcha (probably some embedded security code). My solution was to reload the captcha after the window popup.