Search Posts

Category: recaptcha

How to use .then method for vcRecaptchaService.execute()?

I am using anuglar-recaptcha for adding Google Invisible Recaptcha to my login form The issue I am facing is, immediately after I call vcRecaptchaService.execute, if I print the recaptcha_reponse I will see undefined as output. But if I print recaptcha_reponse few seconds afterwards by using a test function printRecaptchaReponse I will see the recaptcha_reponse getting printed. The Issue here is, the library function vcRecaptchaService.execute() is not returning a $promise here. Its actually returning none Is […]

How to correctly use no captcha reCaptcha API2

Let’s say I have a form only with one input for a username (String). Then the google no captcha reCaptcha (API2) with the checkbox “I’m not a robot” and the submit button. When you press the submit button, the form will check that username is not empty and the captcha got a response string from the public key. If at least one of this is not correct, the user gets a notification in JavaScript right […]

TypeError: Cannot read property ‘value’ of null in angular js

I am using google recaptcha before a form submit in my angular js application and it is working fine for the first time but if i try to submit the form second time(same form) it is showing the error angular.js:14525 TypeError: Cannot read property ‘value’ of null My recaptcha code is <div vc-recaptcha key=”my key here” ng-model=”letter.myRecaptchaResponse” on-create=”setRecaptchaId(widgetId)”> </div> My controller code is $scope.setRecaptchaId = function(widgetId) { $scope.recaptchaId = widgetId; return; }; $scope.letter.mresponse = vcRecaptchaService.getResponse($scope.recaptchaId); […]