[WordPress] Add a super simple anti-spam measure to your contact form
This is Yamada from the Systems Department.
Today we'll be talking about Wordpress.
WordPress has a form creation plugin called ``Contact Form 7'' that
makes it very easy to create something like a small contact form, but if
you don't do it properly, it can become a springboard for spam.
However, for those who don't know how to prevent spam or
don't want to install too many plugins,
we will introduce some simple methods to prevent spam.
Here it is↓
Use Contact Form 7's "Acceptance Confirmation" tag.
By using this, you will not be able to send unless you check the box before sending, so you
can ``mostly'' block programs that automatically send spam.
It's easy to use; when you press the "Confirm consent" button, a dialog like this will appear.
Set any id and class here (you can use it without setting)
and press the "Insert tag" button...
A tag for "acceptance confirmation" will be inserted on the form source!
So, if you don't check it, you won't be able to press the send button (^^)
I can't press the send button!
However, there is one caveat.
For other required items, an input check will be required, but
if this "acceptance confirmation" is the default, no input check error message will be displayed.
If you are worried that someone will not notice that you forgot to check it,
enter the code below in "Other settings".
acceptance_as_validation: on
Now, the input check will be applied to "Confirmation of consent".
An error message was displayed!
Although it cannot completely prevent all spam, you
can expect great results with little effort, so give it a try! !