PHPackages                             wegmeister/recaptcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. wegmeister/recaptcha

ActiveNeos-package[Security](/categories/security)

wegmeister/recaptcha
====================

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

2.3.7(2y ago)884.3k↓39.8%25[1 PRs](https://github.com/die-wegmeister/Wegmeister.Recaptcha/pulls)GPL-3.0-or-laterPHPPHP ^8.0

Since Dec 15Pushed 2y ago5 watchersCompare

[ Source](https://github.com/die-wegmeister/Wegmeister.Recaptcha)[ Packagist](https://packagist.org/packages/wegmeister/recaptcha)[ RSS](/packages/wegmeister-recaptcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (33)Used By (0)

Wegmeister.Recaptcha
====================

[](#wegmeisterrecaptcha)

Neos plugin to integrate Google's reCaptcha into Forms. The following form integrations are supported:

- Neos.Form (v4): Google reCaptcha v2 and v3
- Neos.Form.Builder (v2) (: Google reCaptcha v2 and v3
- Neos.Fusion.Form (v2): Google reCaptcha v3

Installation
------------

[](#installation)

Require the package using composer:

```
composer require wegmeister/recaptcha

```

Afterwards, go to  and create a key for your website. Select the API version you wish to use based on the list above.

Configuration
-------------

[](#configuration)

### HTTP Proxy

[](#http-proxy)

If you are using a http proxy on your server you need to add this configuration:

```
Wegmeister:
  Recaptcha:
    requestMethod: 'Wegmeister\Recaptcha\RequestMethod\CurlPostWithProxy'
    httpProxy: 'http://yourproxy.com:1234'

```

Usage with [Neos.Form](https://github.com/neos/form)
----------------------------------------------------

[](#usage-with-neosform)

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

```
type: 'Neos.Form:Form'
identifier: someIdentifier
label: Label
renderables:
  -
    type: 'Neos.Form:Page'
    identifier: page-one
    renderables:
      -
        type: 'Wegmeister.Recaptcha:CaptchaV2'
        identifier: captcha
        label: Captcha
        properties:
          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
        #renderingOptions:
        #  validationErrorTranslationPackage: 'Wegmeister.Recaptcha'
finishers:
  -

```

Usage with [Neos.Form.Builder](https://github.com/neos/form-builder)
--------------------------------------------------------------------

[](#usage-with-neosformbuilder)

Add a Captcha form element to your form [![Captch Element](Documentation/Images/CaptchaFormElement.png)](Documentation/Images/CaptchaFormElement.png)

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.

Global settings for Neos.Form and Neos.Form.Builder
---------------------------------------------------

[](#global-settings-for-neosform-and-neosformbuilder)

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. Furthermore, there is a polyfill for `Element.prototype.closest`. If you don't need it, you can disable this, too.

```
Neos:
  Form:
    presets:
      default:
        formElementTypes:
          'Wegmeister.Recaptcha:Captcha':
            renderingOptions:
              # 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)
            properties:
              siteKey: 'your-public-key'
              secretKey: 'your-private-key'
```

Usage with [Neos.Fusion.Form](https://github.com/neos/fusion-form)
------------------------------------------------------------------

[](#usage-with-neosfusionform)

> ❗ Currently, only reCaptcha v3 is supported with Fusion Forms. Feel free to provide a PR with support for v2.

Add a `FieldContainer` with the `CaptchaV3` element to your form:

```

```

Set the field name based on our needs, but make sure to use the same field name in the schema (see below).

Since an error message is rendered at the position of the form element, you should place it either at the beginning or at the end of the form.

The following options are available:

- siteKey (required): The reCaptcha v3 website key.
- action: For statistical purposes, use the action to group the captcha evaluations according to your usage, e.g. "contactForm". [More information](https://developers.google.com/recaptcha/docs/v3#actions)
- includeApiScript: Whether or not the reCaptcha API script should be included. If you already include it globally, set this to false.

Then, add the field to the schema and configure the Validator:

```
captchaV3 = ${Form.Schema.string().validator('Wegmeister.Recaptcha:IsValid', {secretKey: 'your-secret-key', errorMessage: 'The reCaptcha check failed. Try submitting the form again.'})}

```

Make sure that the key (e.g. `captchaV3`) matches the key in the FieldContainer (see above).

The following options are available:

- secretKey (required): The reCaptcha v3 secret key.
- errorMessage: Use this to override the error message in case of a failed captcha check.

i18n
----

[](#i18n)

Currently, the following languages are supported: English, German, French and Dutch Feel free to send us labels in other languages so we can add them to the plugin.

Credits
-------

[](#credits)

© Benjamin Klix, [die wegmeister gmbh](https://www.die-wegmeister.com/)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 64.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~98 days

Recently: every ~178 days

Total

31

Last Release

860d ago

Major Versions

1.0.7 → 2.0.02017-06-26

1.0.8 → 2.2.22018-09-11

PHP version history (2 changes)2.1.1PHP ~7.0

2.3.6PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/028c454abbb42f4b6e8f9d37a12857f56a8eda4be858b85185bd57a6ba512540?d=identicon)[wegmeister](/maintainers/wegmeister)

---

Top Contributors

[![Benjamin-K](https://avatars.githubusercontent.com/u/3098031?v=4)](https://github.com/Benjamin-K "Benjamin-K (59 commits)")[![rtp-cgs](https://avatars.githubusercontent.com/u/59559730?v=4)](https://github.com/rtp-cgs "rtp-cgs (13 commits)")[![marcrobertscamao](https://avatars.githubusercontent.com/u/249061?v=4)](https://github.com/marcrobertscamao "marcrobertscamao (3 commits)")[![larswittenberg](https://avatars.githubusercontent.com/u/1742089?v=4)](https://github.com/larswittenberg "larswittenberg (2 commits)")[![lambertweller](https://avatars.githubusercontent.com/u/48316071?v=4)](https://github.com/lambertweller "lambertweller (2 commits)")[![lorenzulrich](https://avatars.githubusercontent.com/u/1816023?v=4)](https://github.com/lorenzulrich "lorenzulrich (2 commits)")[![pankajlele](https://avatars.githubusercontent.com/u/550239?v=4)](https://github.com/pankajlele "pankajlele (2 commits)")[![anianweber](https://avatars.githubusercontent.com/u/18150589?v=4)](https://github.com/anianweber "anianweber (1 commits)")[![waelas](https://avatars.githubusercontent.com/u/10092801?v=4)](https://github.com/waelas "waelas (1 commits)")[![bwaidelich](https://avatars.githubusercontent.com/u/307571?v=4)](https://github.com/bwaidelich "bwaidelich (1 commits)")[![fanat98](https://avatars.githubusercontent.com/u/7521886?v=4)](https://github.com/fanat98 "fanat98 (1 commits)")[![hphoeksma](https://avatars.githubusercontent.com/u/250683?v=4)](https://github.com/hphoeksma "hphoeksma (1 commits)")[![jonathantechniconcept](https://avatars.githubusercontent.com/u/29302103?v=4)](https://github.com/jonathantechniconcept "jonathantechniconcept (1 commits)")[![l-mbert](https://avatars.githubusercontent.com/u/43070365?v=4)](https://github.com/l-mbert "l-mbert (1 commits)")[![mchh](https://avatars.githubusercontent.com/u/523953?v=4)](https://github.com/mchh "mchh (1 commits)")

---

Tags

neos-pluginneoscmsrecaptcha

### Embed Badge

![Health badge](/badges/wegmeister-recaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/wegmeister-recaptcha/health.svg)](https://phpackages.com/packages/wegmeister-recaptcha)
```

###  Alternatives

[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[mageplaza/module-security

Mageplaza Security Extension

4593.3k1](/packages/mageplaza-module-security)[fof/recaptcha

Increase your forum's security with Google reCAPTCHA

1235.4k](/packages/fof-recaptcha)[huangdijia/laravel-recaptcha-v3

recaptcha-v3 for laravel

2011.0k](/packages/huangdijia-laravel-recaptcha-v3)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
