Getting started
Spam protection
How Lazyform keeps spam out of your inbox, what each check catches, and when to add a captcha.
No single check catches all spam, and any check can sometimes be wrong. So we stack several, starting with the ones visitors never notice, and we never delete what we catch: suspected spam goes to your Spam folder, where one click on Not spam restores it and sends it to you as normal. Spam never counts towards your monthly limit.
The layers
| Layer | Catches | Visitor effort | Plan |
|---|---|---|---|
| Honeypot | Most simple bots | None | All |
| Time trap | Bots that fill forms instantly | None | All |
| Rate limits | Floods from one visitor or at one form | None | All |
| Allowed websites | Your key being used on other sites | None | All |
| Spam filter | Spammy links, words and gibberish | None | All |
| Duplicate and throwaway email filters | Repeat junk, disposable addresses | None | Pro |
| Block rules and country filter | Patterns you choose | None | Pro |
| AI spam check | Clever or human-written spam the rules miss | None | Pro |
| Captcha | Advanced bots | Small | Turnstile and hCaptcha: all. reCAPTCHA: Pro |
The honeypot, time trap and spam filter are on for every new form. The rest you switch on per form in the dashboard.
Honeypot
A hidden field that people never see, but bots fill in because they fill in everything. If it arrives with a value, the submission is spam.
<input type="checkbox" name="botcheck" class="hidden" style="display:none" tabindex="-1" autocomplete="off">Hide it with CSS rather than type="hidden", since some bots skip hidden inputs. You can rename the field in the form's settings if botcheck clashes with something.
Time trap
People take a few seconds to fill in a form; bots often take milliseconds. If a form is sent faster than the minimum you set (2 seconds by default), it's flagged.
The time trap needs to know when the form was shown, which the SDK and widget send for you in _lf_started. Plain HTML forms don't send it, so for them this check is simply skipped. To use it with your own JavaScript, add the field when the page loads:
<input type="hidden" name="_lf_started" id="lf-started">
<script>document.getElementById('lf-started').value = Date.now()</script>Rate limits
Each visitor can only send so many submissions a minute, and each form can only receive so many. Floods are refused with rate_limited. Real visitors don't notice.
Allowed websites
Your access key is visible in your page's source, which is fine: it can only send submissions, never read them. But anyone could copy it to their own site. Turn on Allowed websites and list your domains (wildcards like *.example.com work) and submissions from anywhere else are refused with domain_not_allowed. Add localhost while you're developing.
Spam filter
Looks at what was written: lots of links, common spam phrases, gibberish and known spam patterns. Set its sensitivity (low, medium or high) in the form's settings. Higher catches more but is more likely to flag a real message, which is why flagged messages wait in your Spam folder instead of disappearing.
More filters on Pro
- Duplicate filter: ignores the same submission sent twice within a few minutes.
- Throwaway email filter: refuses disposable addresses (
disposable_email). - Email and phone validation: refuses addresses that can't receive mail and numbers in the wrong format.
- Block rules: mark submissions as spam when a field contains words you choose.
- Country filter: accept only, or block, certain countries.
AI spam check
When the other checks aren't sure, an AI model reads the submission and decides whether it's spam. It catches the polite, human-sounding spam that rules miss, like SEO offers and fake partnership pitches. It runs on Cloudflare's infrastructure, and submissions aren't used to train it.
Captcha
If spam still gets through, add a captcha. It's the only layer visitors may notice, which is why it's off unless you choose it.
- Cloudflare Turnstile: free, privacy-friendly, usually invisible. Our recommendation.
- hCaptcha: privacy-focused.
- Google reCAPTCHA v2: the "I'm not a robot" checkbox. Pro.
- Google reCAPTCHA v3: invisible, score-based. Pro.
Once a captcha is connected, every submission to that form needs a valid token, otherwise it's refused with captcha_failed.
When a real message lands in Spam
Open the Spam folder in the dashboard and click Not spam. It moves to your inbox and is delivered to your email and integrations as if it had never been caught. If it keeps happening, lower the spam filter's sensitivity or check your block rules.