I've seen the confusion in more topics on this forum. So I think it wouldn't hurt to make it a bit more verbose.
Here's my form below. On a weekly basis I get at least 3 spam messages. So my assumption is that it doesn't work, or doesn't protect well enough. Even though I also use the DNS blacklisting from SpamHaus and reCaptcha from Google.
title: Contact
form:
name: contact
fields:
name:
label: Name
placeholder: 'Enter your (first) name'
autocomplete: true
autofocus: true
type: text
validate:
required: true
message: 'Your (first) name'
email:
label: Email
placeholder: 'Enter your email address'
type: email
validate:
required: true
message: 'Your email address'
location:
label: Region
placeholder: 'Enter your region (city, municipality or province)'
type: text
validate:
required: false
message:
label: Message
placeholder: 'Enter your message'
type: textarea
validate:
required: true
message: 'Your message'
privacy-policy:
label: 'Have you read our [privacy statement](/privacy-verklaring?target=_blank) and do you agree?'
type: checkboxes
markdown: true
options:
agreed: 'I''ve read it and I agree'
validate:
required: true
message: 'Privacy policy'
g-recaptcha-response:
label: Captcha
type: captcha
recaptcha_not_validated: 'Captcha not valid!'
honeypot:
label: ID
type: honeypot
buttons:
submit:
type: submit
value: Send
reset:
type: reset
value: Reset
process:
dns-blacklist: true
captcha: true
email:
subject: '[Contactformulier] {{ form.value.name|e }}'
body: '{% include ''forms/data.html.twig'' %}'
save:
fileprefix: contact-
dateformat: Ymd-His-u
extension: txt
body: '{% include ''forms/data.txt.twig'' %}'
message: 'Thanks for your message! If you don''t see a message from us in your inbox within a few days, check then your spam folder. Maybe it ended up there unintentionally.'
display: thankyou
process:
markdown: true
twig: true
cache_enable: false
page-toc:
active: false
---
# Contact form
##### Please leave a question or suggestion, you can also do this via our [social-media](/social-media). Also check our [internal search](/search) and [FAQ](/tzm/faq), maybe your question has already been answered.
The example in the documentation shows:
fields:
- name: honeypot
type: honeypot
Is it then fair to assume this is all that's needed to make it work? A spam bot would fill in the field 'honeypot' of type honepot, and when this field contains a value, the message is not sent? Because if I do understand this mechanism correctly, then it's just not a solution that blocks all spam. My implementation has a field called ID, of type honeypot.