Skip to main content
Forms

Spam Protection

Written By Luke Wakefield

Last updated About 3 hours ago

We offer 3 different methods for spam protection, we strongly recommend using one of them and typically Cloudflare Turnstile is the best option.

Double check: It’s important that you use the correct spam protection code for the method of spam protection selected for your form. Look in CMS/forms, then edit the form you’re interested in and check the “Spam Protection” tab:

Cloudflare Turnstile (Recommended)

Unlike traditional CAPTCHAs, most visitors never have to solve a puzzle. Turnstile runs lightweight checks in the background and usually passes genuine visitors with a single click on a checkbox, or none at all. Only suspicious traffic gets a harder challenge.

Full details and how to implement: Cloudflare Turnstile

hcaptcha (more intrusive)

The following Liquid code outputs the hcaptcha challenge box onto the form layout. It also includes additional code to make the challenge box semi-responsive on smaller screen sizes.

{% assign html_attrs = '{}' | parse_json %} {% if context.device.device_type != "desktop" %} {% hash_assign html_attrs['data-size'] = 'compact' %} {% endif %} {% spam_protection 'hcaptcha', html_attributes: html_attrs %}

Google recaptcha (not recommended)

The following code will either output a challenge box or silently analyse submissions, depending on which version you select. The code is the same for both versions.

This solution is not recommended because our experience is that depending on settings it either has more false-positives or false-negatives than hcaptcha.

{% include 'recaptcha' -%}