Title: Captcha Not Working
Last modified: May 3, 2018

---

# Captcha Not Working

 *  Resolved [angel718](https://wordpress.org/support/users/angel718/)
 * (@angel718)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/)
 * Hi,
 * I have previously updated to the new google captcha with no issues whatsoever.
   But yesterday all of a sudden the captcha box was not showing in the contact 
   form on the site.
 * I re-added the necessary keys and saved. The captcha box shows when I view the
   contact form via my website dashboard. But as soon as I open the page via another
   browser or log out, the captcha box is not available.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcaptcha-not-working-34%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10242860)
 * Hello!
 * Probably your form is still using the captcha v1, the captcha v1 is no longer
   usable (was removed by google). To fix this please update your plugin to the 
   latest version, remove your old captcha field and use the new one (v2).
 * Regards!
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10242861)
 * Hello!
 * Probably your form is still using the captcha v1, the captcha v1 is no longer
   usable (was removed by google). To fix this please update your plugin to the 
   latest version, remove your old captcha field and use the new one (v2).
 * Regards!
 *  Thread Starter [angel718](https://wordpress.org/support/users/angel718/)
 * (@angel718)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10242901)
 * I have the latest version of the plugin. It still does not work.
 *  Thread Starter [angel718](https://wordpress.org/support/users/angel718/)
 * (@angel718)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10242904)
 * I have Version 2.6.6
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10242913)
 * Did you already replaced the recaptcha field with the new one?
 *  Thread Starter [angel718](https://wordpress.org/support/users/angel718/)
 * (@angel718)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10242926)
 * Yes. I replaced them again. I did it last night and I did it again just now. 
   Still nothing. I can see the captcha box appear in smart forms after I populate
   the keys. And then I can see the captcha box when I look at the contact form 
   via my dashboard. But as soon as I log out… it’s not there.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10243060)
 * Oh ok, i found the problem. For some reason (it might be a theme or plugin conflict)
   the recaptcha is trying to load itself before it is ready so that is why it is
   crashing at run time.
 * To fix this please open the file js/formbuilder/additionalfields/rednaorecaptcha2.
   js and replace its content for this:
 *     ```
       var __extends = (this && this.__extends) || (function () {
           var extendStatics = Object.setPrototypeOf ||
               ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
               function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
           return function (d, b) {
               extendStatics(d, b);
               function __() { this.constructor = d; }
               d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
           };
       })();
       var SmartFormsFields;
       (function (SmartFormsFields) {
           var rednaorecaptcha2 = /** @class */ (function (_super) {
               __extends(rednaorecaptcha2, _super);
               function rednaorecaptcha2(options, serverOptions) {
                   var _this = _super.call(this, options, serverOptions) || this;
                   _this.IsDynamicField = true;
                   sfFormElementBase.call(_this, options, serverOptions);
                   _this.Title = "Title";
                   _this.paper = null;
                   _this.captchaId = "";
                   if (_this.IsNew) {
                       _this.Options.ClassName = "rednaorecaptcha2";
                       _this.Options.Label = "Captcha";
                       _this.Options.SiteKey = "";
                       _this.ServerOptions.SecretKey = "";
                   }
                   _this.Options.Id = "captcha2";
                   _this.Id = "captcha2";
                   _this.RecaptchaAlreadyLoaded = false;
                   return _this;
               }
               rednaorecaptcha2.prototype.SetData = function (data) {
               };
               rednaorecaptcha2.prototype.CreateProperties = function () {
                   this.Properties.push(new SimpleTextProperty(this, this.Options, "Label", "Label", { ManipulatorType: 'basic' }));
                   this.Properties.push(new SimpleTextProperty(this, this.Options, "SiteKey", "Site Key", {
                       ManipulatorType: 'basic',
                       'Tooltip': {
                           Text: 'Please check tutorial to know how to generate these keys: <a target="_blank" href="https://smartforms.rednao.com/configuring-recaptcha-2">https://smartforms.rednao.com/configuring-recaptcha-2</a>',
                           HideDelay: 3000
                       }
                   }));
                   this.Properties.push(new SimpleTextProperty(this, this.ServerOptions, "SecretKey", "Secret Key", {
                       ManipulatorType: 'basic',
                       Tooltip: {
                           Text: 'Please check tutorial to know how to generate these keys: <a target="_blank" href="https://smartforms.rednao.com/configuring-recaptcha-2">https://smartforms.rednao.com/configuring-recaptcha-2</a>',
                           HideDelay: 3000
                       }
                   }));
               };
               ;
               rednaorecaptcha2.prototype.GenerateInlineElement = function () {
                   var html = '';
                   if (this.Options.SiteKey == '') {
                       html = '<div class="rednao_label_container col-sm-3"><label class="rednao_control_label" >' + this.Options.Label + '</label></div>\
                   <div class="redNaoControls col-sm-9 smartFormsSlider">To use captcha you need to configure a site key and secret key <a target="_blank" href="https://smartforms.rednao.com/?p=3822&preview=true">Learn how to get them here (its free and you can get them in less than 1 minute)</a></div>';
                   }
                   else {
                       html = '<div class="rednao_label_container col-sm-3"><label class="rednao_control_label" >' + this.Options.Label + '</label></div>\
                   <div class="redNaoControls col-sm-9 smartFormsSlider"></div>';
                   }
                   return html;
               };
               ;
               //used in smart forms
               //noinspection JSUnusedGlobalSymbols
               rednaorecaptcha2.prototype.GenerationCompleted = function (jQueryElement) {
                   if (jQueryElement.parent().hasClass('component')) {
                       jQueryElement.find('.redNaoControls').empty();
                       jQueryElement.find('.redNaoControls').append('<img src="' + smartFormsRootPath + 'images/recaptcha2.png"></img>');
                       return;
                   }
                   if (this.Options.SiteKey == '')
                       return;
                   var self = this;
                   this.RecaptchaAlreadyLoaded = false;
                   var siteKey = self.Options.SiteKey;
                   if (siteKey == "")
                       siteKey = "asdfdsaf";
                   var callBack = function () {
                       debugger;
                       var timeOut = setInterval(function () {
                           if (typeof grecaptcha != 'undefined' && typeof grecaptcha.render != 'undefined' ) {
                               jQueryElement = self.JQueryElement; //this is needed because the jqueryelement parameter my not be the one that is shown in the form when the library finished loading
                               if (self.RecaptchaAlreadyLoaded) {
                                   clearInterval(timeOut);
                                   return;
                               }
                               jQueryElement.find('#rc2' + self.Id).remove();
                               var $recaptchaControl = rnJQuery('<div id="rc2' + self.Id + '"></div>');
                               if (smartFormsDesignMode)
                                   $recaptchaControl.css('pointer-events', 'none');
                               jQueryElement.find('.redNaoControls').append($recaptchaControl);
                               self.RecaptchaAlreadyLoaded = true;
                               clearInterval(timeOut);
                               self.captchaId = grecaptcha.render($recaptchaControl[0], { sitekey: siteKey });
                           }
                       }, 10);
                   };
                   callBack = callBack.bind(this);
                   var count = 1;
                   while (typeof (window['sfRecatchaCallBack' + count]) != 'undefined')
                       count++;
                   window['sfRecatchaCallBack' + count] = callBack;
                   rnJQuery.RNLoadLibrary(['https://www.google.com/recaptcha/api.js?onload=sfRecatchaCallBack' + count], [], callBack);
               };
               rednaorecaptcha2.prototype.interpolate = function (start, end, smilePercentage) {
                   return (start + ((end - start) * smilePercentage)).toString();
               };
               //used in smart forms
               //noinspection JSUnusedGlobalSymbols
               rednaorecaptcha2.prototype.GetValueString = function () {
                   if (this.IsIgnored())
                       return { value: '' };
                   return { value: this.JQueryElement.find('.sfSlider').slider('option', 'value') };
               };
               ;
               //used in smart forms
               //noinspection JSUnusedGlobalSymbols
               rednaorecaptcha2.prototype.IsValid = function () {
                   var response = grecaptcha.getResponse(this.captchaId) != '';
                   if (response == "")
                       this.AddError('root', this.InvalidInputMessage);
                   else
                       this.RemoveError('root');
                   return this.InternalIsValid();
               };
               ;
               //used in smart forms
               //noinspection JSUnusedGlobalSymbols
               rednaorecaptcha2.prototype.StoresInformation = function () {
                   return false;
               };
               ;
               rednaorecaptcha2.prototype.GetValuePath = function () {
                   return 'formData.' + this.Id + '.value';
               };
               ;
               return rednaorecaptcha2;
           }(sfFormElementBase));
           SmartFormsFields.rednaorecaptcha2 = rednaorecaptcha2;
       })(SmartFormsFields || (SmartFormsFields = {}));
       //# sourceMappingURL=rednaorecaptcha2.js.map
       ```
   
 * I will include this workaround in the next plugin update.
 * Regards!
 *  Thread Starter [angel718](https://wordpress.org/support/users/angel718/)
 * (@angel718)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10243097)
 * I opened the file…
    When I replaced the contents with what you said. the last
   line ” //used in smart forms” says “unexpected end of input” and there is no 
   difference. The captcha is still not showing.
    -  This reply was modified 8 years, 2 months ago by [angel718](https://wordpress.org/support/users/angel718/).
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10243117)
 * Err unfortunately i am not able to tell you that as it highly depends on your
   server configuration =S. Could you ask your hosting provider how can you modify
   a file please?
 *  Thread Starter [angel718](https://wordpress.org/support/users/angel718/)
 * (@angel718)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10243120)
 * I opened the file…
    When I replaced the contents with what you said. the last
   line ” //used in smart forms” says “unexpected end of input” and there is no 
   difference. The captcha is still not showing.
 *  Thread Starter [angel718](https://wordpress.org/support/users/angel718/)
 * (@angel718)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10243129)
 * Sorry. I missed out some of the last text.. I have amended this now… But still
   the captcha is not showing.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10243140)
 * It is now actually working for me. Maybe you just need to clear your temporary
   browser files and try again. Could you do so please?
 *  Thread Starter [angel718](https://wordpress.org/support/users/angel718/)
 * (@angel718)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10243215)
 * Yes that works now. Thank you

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Captcha Not Working’ is closed to new replies.

 * ![](https://ps.w.org/smart-forms/assets/icon-256x256.jpg?rev=1226707)
 * [Smart Forms - when you need more than just a contact form](https://wordpress.org/plugins/smart-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-forms/reviews/)

## Tags

 * [reCAPTCHA](https://wordpress.org/support/topic-tag/recaptcha/)

 * 12 replies
 * 2 participants
 * Last reply from: [angel718](https://wordpress.org/support/users/angel718/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/captcha-not-working-34/#post-10243215)
 * Status: resolved