rfuehricht/formhandler-hcaptcha

Add error check hcaptcha to Formhandler.

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:typo3-cms-extension

13.0.2 2025-07-03 13:27 UTC

This package is auto-updated.

Last update: 2025-07-03 13:27:26 UTC


README

Adds error check hcaptcha to Formhandler.

Requires dreistromland/typo3-hcaptcha.

Usage

Register and get your Site Key and Private Key from https://www.hcaptcha.com/

Enter your data in TypoScript or via ENV variables. See documentation of EXT:hcaptcha for details.

plugin.tx_hcaptcha {
  settings {
    publicKey = <your-site-key>
    privateKey = <your-private-key>
  }
}

Add captcha field to your form:

<html
    data-namespace-typo3-fluid="true"
    xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
    xmlns:fh="http://typo3.org/ns/Rfuehricht/Formhandler/ViewHelpers"
    xmlns:hcaptcha="http://typo3.org/ns/Waldhacker/Hcaptcha/ViewHelpers"
>

<hcaptcha:forms.hcaptcha />
<fh:errorMessages as="message" error="hcaptcha" field="hcaptcha">
    <div class="error">{message}</div>
</fh:errorMessages>

</html>

Configure error check in TypoScript:


validators {
  1 {
    config {
      fieldConf {
        hcaptcha.errorCheck.1 = Rfuehricht\FormhandlerHcaptcha\ErrorCheck\Hcaptcha
      }
    }
  }
}