Form Element for the Flow Form Framework integrating Google's Recaptcha

Installs: 24 194

Dependents: 0

Suggesters: 0

Security: 0

Stars: 8

Watchers: 7

Forks: 18

Open Issues: 1


2.3.1 2021-07-01 13:09 UTC


Tested with Flow 4.0.x

Neos-Plugin to integrate Google's Recaptcha into Forms

© Benjamin Klix, die wegmeister gmbh


Require the package using composer:

composer require wegmeister/recaptcha

After this go to http://www.google.com/recaptcha and create some keys for your website (reCAPTCHA, Version 2).

Using this package without the Neos.Form.Builder package

Simply add the new form element to your form definition renderables:

type: 'Neos.Form:Form'
identifier: someIdentifier
label: Label
    type: 'Neos.Form:Page'
    identifier: page-one
        type: 'Wegmeister.Recaptcha:CaptchaV2'
        identifier: captcha
        label: Captcha
          siteKey: your-public-key
          secretKey: your-private-key
          # Optional value if you want to verify the hostname too:
          expectedHostname: 'www.your-domain.com'
          wrapperClassAttribute: 'form-group'
          # Optional values to adjust recaptcha. For further information visit
          # https://developers.google.com/recaptcha/docs/display#config
          theme: 'light'
          type: 'image'
          size: 'normal'
          tabindex: 0
          # If you want to print the recaptche text in a specified language,
          #   you can set that language here.
          # Note: If you use the Neos.Form.Builder package, the language will
          #   automatically be set by your current language dimension.
          #lang: 'de'
        # optionally change the translationPackage
        # if you want to adjust the error message
        #  validationErrorTranslationPackage: 'Wegmeister.Recaptcha'
   <Your finishers here>

Using this package with Neos.Form.Builder

Install Neos.Form.Builder

composer require neos/form-builder

Add Captcha form element to your form Captch Element

Configure reCaptcha site key, secret key and other settings from the Inspector

❗ The old ReCaptcha form element with an additional validator required will be removed in Version 3.x of this plugin. Please update to the new form element.


This plugin will automatically load the required recaptcha/api.js file once. If you already load this file yourself, you can disable it in the settings. Also there is a polyfill for Element.prototype.closest. If you don't need it, you can disable this, too.

              # If you have already included the ReCaptcha api.js file yourself, set this to false.
              includeAPIScript: true
              # If you don't need a closest polyfill in js, set this to false.
              includeClosestPolyfill: true
            # Set your siteKey and secretKey in your settings file globally (or if you want to keep it outside your git)
              siteKey: 'your-public-key'
              secretKey: 'your-private-key'


English, German, French and Dutch are the only supported languages at the moment. Feel free to send us another language to add it to the plugin.