Drupal
Official CaptchaLa module for Drupal. It adds CaptchaLa as a challenge type of the contributed CAPTCHA module, so you can put it on the login, registration, password reset, contact and comment forms, or on any other form, without writing code.
Every widget is backed by a server-issued, single-use token, and each submission is checked on your server before Drupal processes the form.
What it covers
CaptchaLa protects every form you assign it to in the CAPTCHA module. The action is picked from the form ID:
| Form ID | Action |
|---|---|
user_login_form, user_login, user_login_block | login |
user_register_form | register |
user_pass | lost_password |
user_pass_reset* | reset_password |
comment_* | comment |
contact_* (including contact_message_form) | contact_form |
| Any other form | generic_form |
A token solved for one kind of form is refused on another. When a check fails, the submission stops with a normal Drupal form error and the visitor can try again.
Requirements
- Drupal 9, 10 or 11
- PHP 8.1+
- The CAPTCHA module 2.x
- A CaptchaLa account — get your App Key + App Secret at
dash.captcha.la
Install
Copy the GitHub repository to
modules/contrib/captchala.In the site root, install the PHP SDK and the CAPTCHA module:
bashcomposer require captchala/captchala-php drupal/captchaEnable both modules:
bashdrush en captchala captcha
Configure
- Go to Administration → Configuration → Web services → CaptchaLa (
/admin/config/services/captchala). - Paste your App Key and App Secret, then click Test connection to check the credentials end-to-end.
- Choose a Product (widget mode) and Language, and click Save configuration.
- Go to Administration → Configuration → People → CAPTCHA module settings (
/admin/config/people/captcha) and pick CaptchaLa as the challenge type for each form you want to protect.
Both pages need the Administer CAPTCHA settings permission.
| Setting | Default | Description |
|---|---|---|
| App Key | — | Public key from the CaptchaLa dashboard. Required. |
| App Secret | — | Server secret, used to issue and validate tokens. Required; never sent to the browser. Leave the field empty to keep the saved secret. |
| Product | bind | bind (the check runs when the visitor presses the form's submit button), popup, float or embed (a verification bar inside the form). |
| Language | auto | A BCP-47 tag such as ja or pt-BR, or auto to follow the language of the Drupal page. |
| Skip CAPTCHA for logged-in users | on | Authenticated users see no challenge on protected forms. |
| Log validation failures | off | Writes failed checks to the Drupal log. Useful while setting up. |
Screenshots



Notes
- Fallback. Until the App Key and App Secret are saved, or if CaptchaLa cannot be reached when the form is built, the module shows the CAPTCHA module's Math challenge instead, so the form is never left unprotected. Administrators see a reminder to enter the credentials.
- Page cache. Each protected form carries its own token, so Drupal does not cache those pages for anonymous visitors.
Troubleshooting
- A Math question appears instead of CaptchaLa. The credentials are missing or the check could not be started. Run Test connection on the settings page, and turn on Log validation failures to see details in the Drupal log.
- Every submission is refused. Make sure the App Key and App Secret belong to the same app, and that your site's domain is allowed for that app in the dashboard.
- Trying it out. The public test keys let you check the full flow without an account.
Links
- Source and issues: github.com/Captcha-La/captchala-drupal
- Support: [email protected]