• Resolved jordantrizz

    (@jordantrizz)


    In file includes/Fields/Recaptcha.php line 52 there is no logic to provide the appropriate configured key for v3 captcha

        public function localize_settings( $settings, $form ) {
            $settings['site_key'] = Ninja_Forms()->get_setting( 'recaptcha_site_key' );
            $settings['theme'] = Ninja_Forms()->get_setting( 'recaptcha_theme' );
            $settings['theme'] = ( $settings['theme'] ) ? $settings['theme'] : 'light';
            $settings['lang'] = Ninja_Forms()->get_setting( 'recaptcha_lang' );
            return $settings;
        }
    

    If you configure Recaptcha v3 with the appropriate keys, the Recaptcha box doesn’t display on the form. In Goolge Chrome developer console, you’ll see:

    recaptcha__en.js:213 Uncaught Error: Missing required parameters: sitekey
        at un.<anonymous> (recaptcha__en.js:213)
        at new un (recaptcha__en.js:481)
        at $B.<anonymous> (recaptcha__en.js:282)
        at new $B (recaptcha__en.js:464)
        at recaptcha__en.js:109
        at HTMLDivElement.<anonymous> (front-end-deps.js?ver=3.6.7:131)
        at Function.each (jquery.min.js?ver=3.6.0:2)
        at s.fn.init.each (jquery.min.js?ver=3.6.0:2)
        at n.renderCaptcha (front-end-deps.js?ver=3.6.7:122)
        at p (backbone.min.js?ver=1.4.0:2)
    

    Doing a view source, you’ll see the site_key is set to false.

    ["recaptcha","input"],"old_classname":"","wrap_template":"wrap","site_key":false,"theme":"light","lang":false}

    Adding the appropriate Recaptcha V2 keys results in site_key showing the Recaptcha V2 site key.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi, I have the same problem.

    Thread Starter jordantrizz

    (@jordantrizz)

    I’ve submitted two tickets to Ninja Forms via their website, no response yet ??

    Also seems like they made it this way so you have to purchase the paid version. Which is really unethical.

    Actually Ninja Forms is free and you pay for the add-ons but there is no reCAPTCHA add-on. I’m doing it wrong?

    Thread Starter jordantrizz

    (@jordantrizz)

    The reCaptcha feature is a part of the free plugin, reCaptcha v2 works and v3 is broken. The backend setting fields are there to enable it but there is no code for it to function.

    Do you mean the keys? Those you have to set them on the Settings

    Plugin Contributor Justin McElhaney

    (@jmcelhaney)

    @jordantrizz As @metalinedev said, the reCAPTCHA functionality is included in the Free Ninja Forms core plugin.

    Can you make sure that the correct v2 or v3 reCAPTCHA keys are added under Ninja Forms > Settings?

    The v2 reCAPTCHA is added to a form via the v2 reCAPTCHA field, and the v3 reCAPTCHA is added to a form via the v3 reCAPTCHA action.

    If you continue to have issues, can you contact our official support, so we can take a closer look into this? https://ninjaforms.com/contact/

    Thread Starter jordantrizz

    (@jordantrizz)

    Thanks, that’s my error. I didn’t have the Recaptcha v3 setup under actions. This resolved the issue. Perhaps it’s not the best UI/UX choice or at least a note on the Recaptcha v2 field on how to add Recpatcha v3.

    Put in two tickets, no response.

    You can close this.

    • This reply was modified 2 years, 10 months ago by jordantrizz.

    I had this problem as I was placing the Recaptcha V2 in the form and had the V3 Recaptcha action set up. To resolve my issue, I simply had to remove the Recaptcha V2 from my form and V3 took over like it should. V3 isn’t broken. I was just doing it wrong.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Recaptcha v3 Broken’ is closed to new replies.