> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crunchforms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Honeypot field: stop form spam with one hidden input

> A honeypot is a hidden form field humans never fill and bots always do. One line of markup, no captcha, no friction — and it stops most drive-by spam on its own.

## Overview

The Honeypot Field is a simple way to reduce spam without adding friction (such as CAPTCHAs) to your form. When enabled, your form includes a hidden input that human users will leave empty — but bots often complete. Any submission where the honeypot contains a value is treated as spam according to your form’s configuration.

***

## Enabling the Honeypot Field

You can enable Honeypot protection in the Crunchforms dashboard:

1. Navigate to your [dashboard](https://crunchforms.com/dashboard)
2. Open the form's settings by selecting **Edit Form Settings** from the menu next to the form,
   or from the same menu inside the form's submission view.
3. Go to the **Spam protection** section.
4. Enter the name of the honeypot field you would like to use (e.g., `hp_username`, `website`), or press the  button to generate a random one. It must match the `name` attribute of the hidden field in your form.
5. Save your changes.

Once a name is set, the settings page shows you the exact hidden input to paste into your page, and the code snippet in the left-hand panel includes it automatically.

> [!WARNING]
>
> Crunchforms checks the **saved** field name. If you change the name, save before updating your page — otherwise the two no longer match and the trap catches nothing.

***

## Adding the Honeypot Field to your Form

If you are building a custom frontend and POSTing to Crunchforms, include a hidden honeypot field in your HTML:

```html honeypot-form.html theme={null} theme={null}
<form 
    action="https://crunchforms.com/form/{formID}" 
    method="post"
> 
	<label for="email">Please Enter Your Email</label> 
	<input name="email" type="email" id="email" /> 
	<div style="position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden;">
		<input 
			type="text" 
			id="{honeypotFieldName}" 
			name="{honeypotFieldName}" 
			autocomplete="nope"
			tabindex="-1"
		/>
	</div>
	<button type="submit">Submit</button> 
</form>
```

### Recommended Practices

* **Do not use `display:none`** — bots often ignore fully hidden fields.
* Push the field off-screen using positioning, not `visibility:hidden`.
* Use a natural-sounding field name (e.g., `website`, `username`, `hp_name`).
* Add `tabindex="-1"` to avoid keyboard focus.
* Set `autocomplete` to a non-standard value (e.g., `"nope"`) to prevent browser autofill.

***

## API Usage

If you are submitting JSON data, include the honeypot field like any other field:

### Example Valid Submission

```json theme={null}
{
    "name": "Jane Doe",
    "email": "jane@example.com",
    "{HoneypotFieldName}": ""
}
```

### Example Spam Submission

This submission would be rejected as spam because the honeypot field is filled:

```json theme={null}
{
    "name": "Jane Doe",
    "email": "jane@example.com",
    "{HoneypotFieldName}": "Filled by bot"
}
```

## Limitations

* Honeypot fields work best against low-complexity bots.
* Advanced bots may detect hidden fields. For stronger protection, consider other methods like [Cloudflare Turnstile](https://docs.crunchforms.com/advanced/turnstile.md) or [reCAPTCHA](https://docs.crunchforms.com/advanced/recaptcha.md).

## Next steps

Explore advanced configurations and features:

> [card] [Set up a Honeypot Field](https://docs.crunchforms.com/advanced/honeypot.md)
>
> Get easy protection against simple bots using a hidden field

> [card] [Set up Cloudflare Turnstile](https://docs.crunchforms.com/advanced/turnstile.md)
>
> Advanced bot protection using Cloudflare Turnstile

> [card] [Set up Google Recaptcha](https://docs.crunchforms.com/advanced/recaptcha.md)
>
> Advanced bot protection using Google reCaptcha v3

> [card] [Add additional email addresses](https://docs.crunchforms.com/advanced/emails.md)
>
> Add and verify additional email addresses to receive form submission notifications

## Need Help?

> [card] [Get Support](https://crunchforms.com/support)
>
> Send us a note


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.