0

I am very new to captcha. I want to disable submit button until captcha is verified successfully. (restricting from form submission until captcha is validated successfully)

<div class="col-sm-offset-3 col-sm-6">
                        <div class="g-recaptcha" data-sitekey="sitekey"></div>
                    </div>

        <div class="row form-row1">

            <div class="col-sm-6 col-md-6 col-xs-4"></div>
            <div class="col-sm-4 col-xs-4">
                <button type="button" class="btn btn-primary" ng-click="registration()" style="float: left;">SUBMIT</button>
            </div>
            <div class="col-sm-4"></div>
        </div>
sudarsan
  • 75
  • 4
  • 17
  • You need to add `ng-disabled="!validCaptcha"` to the button, and in your controller you need to set `$scope.validCaptcha = true;` after the captcha was validated – Alon Eitan Apr 24 '17 at 08:04
  • But in controller I am not using any captcha validation script – sudarsan Apr 24 '17 at 09:12
  • You're using SPA, so read the documentation (or tutorials) about implementing captcha in single page applications – Alon Eitan Apr 24 '17 at 09:18

0 Answers0