Rate limiting |
Drupal Canvas Forms enforces per-Internet Protocol (IP) address limits and site-wide limits within a time window. By default, this limit is 10 submissions per IP address every 10 minutes, with a higher global ceiling. Rejected spam counts toward these limits. File uploads and token requests maintain separate limits. |
CAPTCHA supports the following providers:
Provider | Notes |
|---|---|
Cloudflare Turnstile | Privacy-friendly challenge with no visible puzzle in most cases. |
hCAPTCHA | Widget-based challenge. |
Friendly CAPTCHA | Proof-of-work challenge with no user interaction. |
Google reCAPTCHA v3 | Invisible, score-based verification. |
CAPTCHA features two modes to verify form setups before the system blocks submissions:
CAPTCHA never locks out real users because of a configuration problem or a provider problem. If an administrator disables CAPTCHA, misconfigures CAPTCHA, or the provider becomes unreachable, Drupal Canvas Forms does not block submissions based on the CAPTCHA signal. The honeypot, rate limit, and challenge token controls continue to apply. Only a definitive verification failure, or an absent token in the Enforce mode, rejects a submission.
To configure CAPTCHA:
In the Source CMS administration menu, click Configuration.
Click System and select CAPTCHA.
Choose Monitor for the Mode to start.
Drupal Canvas Forms stores the secret key securely on the server and never displays it again. To replace the secret key, enter a new value and save the configuration. To remove the secret key, select Remove the stored secret. An administrator cannot remove the secret key while CAPTCHA remains enabled. Enter a replacement key first or disable CAPTCHA.
While CAPTCHA remains enabled, the starter code generated on the Connect view includes the CAPTCHA widget. Forms generated or regenerated work with CAPTCHA automatically.
To add the widget to a hand-authored form component, add two lines of code:
Add the import at the top of the component with the other imports:
import { CanvasFormCaptcha } from 'acquia/captcha';Add the widget inside the form before the submit button:
<CanvasFormCaptcha />The widget locates its own enclosing form and requires no properties. The CAPTCHA settings page displays these two snippets for easy duplication.
Turn CAPTCHA on in the Monitor mode first. In this mode, Canvas Forms logs a message for any submission that the system would otherwise reject, which includes submissions to forms that lack the widget. This helps administrators find and fix errors without turning away real visitors. After the logs confirm that all forms submit valid CAPTCHA tokens, change the Mode to Enforce and Save.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.