Prevent Spam with a Honeypot
Learn how to include a honeypot in your form to prevent spam submisions.
A honeypot is a term coined to describe strategy where a fake, hidden input field is included on a form. If a bot then tries to fill out the form, it will mistakely fill out the honey pot.
Our backend processing system will then see that the honeypot field was filled out and block the submission. This saves you time and also does not count against your monthly submission allocation.
To enable the honeypot, you simply need to include a
name attribute set to
slap_honey and make it
<form method="POST" action="https://api.slapform.com/[email protected]"> <input type="email" name="email"> <input type="text" name="slap_honey" hidden> <textarea type="text" name="message"></textarea> <button type="submit">Submit</button> </form>
It is important that you make the
hidden and do not add a required attribut on it.
If it is hidden, then a human won't fill it out, which is ideal!