PHPackages                             oposs/silverstripe-hcaptcha - 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. oposs/silverstripe-hcaptcha

ActiveSilverstripe-vendormodule[Security](/categories/security)

oposs/silverstripe-hcaptcha
===========================

Protect your forms with hCaptcha

0.2.0(1y ago)11.3k2MITPHPPHP ^8.1

Since Feb 25Pushed 1y ago5 watchersCompare

[ Source](https://github.com/oposs/silverstripe-hcaptcha)[ Packagist](https://packagist.org/packages/oposs/silverstripe-hcaptcha)[ Docs](https://oetiker.ch)[ RSS](/packages/oposs-silverstripe-hcaptcha/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

hCaptcha spam protection
========================

[](#hcaptcha-spam-protection)

Protect your forms with [hCaptcha](https://www.hcaptcha.com/), a GDPR, CCPA, LGPD, PIPL and more compliant spam prodection (according their website)

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

[](#installation)

**Note:** This version of the module is compatible with Silverstripe CMS 5.x. For Silverstripe 4.x compatibility, please use an earlier version/tag.

Make sure you met the following requirements beforehand:

- SilverStripe 5.x
- SilverStripe Spam Protection 4.x
- PHP 8.1+
- PHP CURL and JSON extensions

```
composer require oposs/silverstripe-hcaptcha

```

And set hCaptcha as your default spamprotector:

```
# app/_config/spamprotection.yml
SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension:
  default_spam_protector: Oposs\hCaptcha\hCaptchaProtector
```

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

[](#configuration)

In your `app/_config/hcaptcha.yml`

```
Oposs\hCaptcha\Forms\hCaptchaField:
  site_key: 'your_site_key'
  # Make sure to set the key starting with 0x.. in quotes
  secret_key: 'your_secret_key'
  # To configure options listed here https://docs.hcaptcha.com/configuration
  api_configuration:
    recaptchacompat: 'off'
```

For more configuration options check comments in [hCaptchaField.php](src/Forms/hCaptchaField.php)

Usage
-----

[](#usage)

In php:

```
use Oposs\hCaptcha\hCaptchaProtector\Forms

new hCaptchaField('SpamProtection', 'SpamProtection', null);
```

Or if you use [Userforms](https://github.com/silverstripe/silverstripe-userforms):

[![img.png](img/img.png)](img/img.png)

Troubleshooting
---------------

[](#troubleshooting)

**Q:** Users are redirected to the main page when the captcha is incorrect or not solved

**A:** This is most likely a redirecting problem, if your site is running behind a proxy have a look at the Director's `alternate_base_url` property (albeit heavily used, not document yet...)

Contributions are welcome :)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance47

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~399 days

Total

4

Last Release

393d ago

PHP version history (2 changes)0.1.0PHP ^7.4 || ^8.0

0.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/245c8008d0486b01441891495e14caff41b2ab49c73cacc67e3c79ce23f77713?d=identicon)[sirtoobii](/maintainers/sirtoobii)

---

Top Contributors

[![sirtoobii](https://avatars.githubusercontent.com/u/1969330?v=4)](https://github.com/sirtoobii "sirtoobii (6 commits)")[![oetiker](https://avatars.githubusercontent.com/u/429279?v=4)](https://github.com/oetiker "oetiker (1 commits)")

---

Tags

silverstripecaptchaspamprotectionhcaptcha

### Embed Badge

![Health badge](/badges/oposs-silverstripe-hcaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/oposs-silverstripe-hcaptcha/health.svg)](https://phpackages.com/packages/oposs-silverstripe-hcaptcha)
```

###  Alternatives

[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[dnadesign/silverstripe-elemental

Elemental pagetype and collection of Elements

1141.1M310](/packages/dnadesign-silverstripe-elemental)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[exadium/silverstripe-invisible-spam-protection

Very simple anti spam protection based on principle that automated spammers enter bogus information in all form fields. Field is added to form that is hidden using CSS hiding it from human users. Form is only allowed to be submitted if field is empty. Includes an EditableInvisibleSpamField to integrate with the UserForms module.

112.1k](/packages/exadium-silverstripe-invisible-spam-protection)

PHPackages © 2026

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