# Add a honeypot to forms

**URL:** https://forums.concretecms.org/t/add-a-honeypot-to-forms/3615
**Category:** Using Concrete / Help
**Created:** [July 28, 2022, 6:55am UTC](https://forums.concretecms.org/t/add-a-honeypot-to-forms/3615 "2022-07-28T06:55:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ObiWan](https://forums.concretecms.org/user_avatar/forums.concretecms.org/obiwan/32/801_2.png) [@ObiWan](https://forums.concretecms.org/u/ObiWan)
#### Post date: [July 28, 2022, 6:55am UTC](https://forums.concretecms.org/t/add-a-honeypot-to-forms/3615/1 "2022-07-28T06:55:57Z")

</div>

Hello,

I added a regular form block and all works well. Only issue is that I am now beginning to receive spam (unsurprisingly). I still want to avoid the Captcha to make it easier for my customers and want to try a honeypot first. I do not see a way to implement this with the current form dialogue.

Do you know of a way to implement a honeypot?

Appreciate any pointers.

---

<div class="post-metadata">

### Author: ![JohntheFish](https://forums.concretecms.org/user_avatar/forums.concretecms.org/johnthefish/32/3767_2.png) [@JohntheFish](https://forums.concretecms.org/u/JohntheFish)
#### Post date: [July 28, 2022, 8:15am UTC](https://forums.concretecms.org/t/add-a-honeypot-to-forms/3615/2 "2022-07-28T08:15:23Z")

</div>

One of the uses of @mnakalay’s **Hidden Data Attributes for Express** is to create a honeypot.

> **[Hidden Data Attributes for Express - Concrete CMS](https://marketplace.concretecms.com/marketplace/addons/hidden-data-attributes-for-express)**
>
> Easily add hidden data to your Express forms — Data provided by you or automatically, not by the submitter

As an aside, I have a new forms system on the way that will include a honeypot form element.

---

<div class="post-metadata">

### Author: ![mnakalay](https://forums.concretecms.org/user_avatar/forums.concretecms.org/mnakalay/32/3625_2.png) [@mnakalay](https://forums.concretecms.org/u/mnakalay)
#### Post date: [July 28, 2022, 12:35pm UTC](https://forums.concretecms.org/t/add-a-honeypot-to-forms/3615/3 "2022-07-28T12:35:37Z")

</div>

Thank you @JohntheFish 🙂

Since you’re using a regular form and not an Express form (if I’m not mistaken) you might want to try this instead:

> **[Anti-Spammer Master - Concrete CMS](https://marketplace.concretecms.com/marketplace/addons/anti-spammer-master/)**
>
> Save yourself from the misery of spam.

It includes a honeypot and several other anti-spam techniques

---

<div class="post-metadata">

### Author: ![ObiWan](https://forums.concretecms.org/user_avatar/forums.concretecms.org/obiwan/32/801_2.png) [@ObiWan](https://forums.concretecms.org/u/ObiWan)
#### Post date: [July 29, 2022, 12:27pm UTC](https://forums.concretecms.org/t/add-a-honeypot-to-forms/3615/4 "2022-07-29T12:27:13Z")

</div>

Thank you for your responses.

Appreciate that and will keep it in mind. I was more looking for a way to code it myself. But then I might have posted this in the wrong board.

Again, thank you for your pointers.

---

<div class="post-metadata">

### Author: ![mnakalay](https://forums.concretecms.org/user_avatar/forums.concretecms.org/mnakalay/32/3625_2.png) [@mnakalay](https://forums.concretecms.org/u/mnakalay)
#### Post date: [July 30, 2022, 10:32pm UTC](https://forums.concretecms.org/t/add-a-honeypot-to-forms/3615/5 "2022-07-30T22:32:23Z")

</div>

Coding it yourself is doable, but you will have to override the form block’s controller or write a class to use concrete antispam architecture.

For the normal form block just create a block template that adds your honeypot field in the view.  
Then, if you override the block’s controller, check for that specific input in the submit method.  
To override the controller, you just put a copy of it in application\blocks\form and change the namespace to reflect the new location.

It’s not overly complicated if you know PHP.

If you don’t, you might want to consider ready-made solutions.
