- What is anakadote/statamic-recaptcha used for?
- It is a Statamic addon that integrates Google reCAPTCHA with Statamic forms to help block spam and automated submissions. You configure your site and secret keys, enable protection on forms, and let the addon validate submissions server-side. It is intended for Laravel-based Statamic sites that want reCAPTCHA without building the integration from scratch.
- How do I install anakadote/statamic-recaptcha in a Statamic project?
- Install it with Composer from your project root using composer require anakadote/statamic-recaptcha. Statamic addons are typically discovered automatically, but you should follow the README for any publish or registration steps. After installation, configure your Google reCAPTCHA credentials before enabling protection on forms.
- How do I configure the Google reCAPTCHA site and secret keys?
- Add your reCAPTCHA site key and secret key through the addon configuration, commonly using environment variables referenced by the published config file. Keep the secret key server-side and never expose it in frontend markup. Confirm the keys match the reCAPTCHA type you intend to use.
- How do I enable reCAPTCHA protection on a Statamic form?
- The addon is designed to let you enable protection on Statamic forms with minimal setup. Follow the README for the exact form configuration or tag changes required. Once enabled, render the reCAPTCHA widget and let the addon validate the returned token on submission.
- Does this addon validate reCAPTCHA server-side?
- Yes, the package is intended to validate submissions server-side using Google's verification endpoint, which is the layer that actually blocks automated submissions. Client-side widgets alone can be bypassed, so server-side validation is essential. Invalid or missing tokens should be rejected before your form logic runs.
- Which Laravel or Statamic versions are supported?
- The package README and composer.json are the authoritative source for supported Laravel and Statamic versions. Check the Composer constraints before installing, especially if you are on an older or newer Statamic release. Composer will normally prevent installation when your application does not satisfy the version requirements.
- Can I test forms with reCAPTCHA enabled locally or in automated tests?
- reCAPTCHA can make local and automated form tests unreliable because tokens are issued by Google and may be tied to domains or keys. Use Google's test keys where appropriate, or disable or bypass the addon validation in your test environment according to the README. Avoid weakening production validation just to make tests pass.
- What happens if a submission fails reCAPTCHA validation?
- Missing, invalid, or expired reCAPTCHA tokens should cause the form submission to fail validation. The addon should surface a validation error so the user can retry. Your application should not process the submitted data until verification succeeds.
- Are there alternatives to this addon for blocking Statamic form spam?
- Alternatives include honeypot fields, timed form checks, other Statamic spam-protection addons, and custom Laravel validation against Google reCAPTCHA or similar services. Choose based on whether you need reCAPTCHA v2, v3 scoring, invisible reCAPTCHA, or a non-Google approach. This addon is best when you specifically want Google reCAPTCHA inside Statamic forms.
- Is the addon actively maintained and how do I troubleshoot configuration issues?
- Check the GitHub repository for recent commits, releases, and open issues before adopting it. For troubleshooting, verify your keys, domain restrictions, config caching, and whether the form is submitting a valid token. Clear Laravel and Statamic caches after changing environment variables or configuration.