tanveery / recaptcha-net

reCAPTCHA for .NET library lets you easily use Google's reCAPTCHA in an ASP.NET Web Forms / MVC / ASP.NET Core application.
Apache License 2.0
161 stars 68 forks source link

Added client callback properties for v2 #34

Closed MagnusJohansson closed 7 years ago

MagnusJohansson commented 7 years ago

This extends the control with the data-callback and data-expired-callback properties. So one can enable/disable a submit button:

 @Html.Recaptcha(dataCallback: "capenable", dataExpiredCallback: "capdisable")
...
 <input type="submit" class="btn btn-default" value="Register" />
   ...
<script type="text/javascript">
        function capenable() {
            $('input[type="submit"]').prop('disabled', false);
        }
        function capdisable() {
            $('input[type="submit"]').prop('disabled', true);
        }
        $(document).ready(function () {
            capdisable();
        });
    </script>
arc95 commented 6 years ago

Is the callback feature available now?

vidyesh-phases commented 5 years ago

Looks like this feature is not available in the version 2.1.0