Back

Honeypot Spam Filtering

Trick the bots and filter the spam

A "honeypot" is a way to lure spambots into identifying themselves so you can safely ignore and forms they submit. It takes advantage of the fact that bots are often designed to complete every fields on a form, to avoid validation errors, by using a hidden field that a real user could never populate. A form with a completed honeypot field can, therefore, be safely rejected.

To enable StaticForms to filter spam you need to add a hidden field with the name _honeypot to your forms.

<input name="_honeypot" type="hidden" style="display:none" />

When StaticForms sees this field it checks whether it contains a value and, if it does, marks the submitted form as spam.