I am fighting against future bot spamers for my newsletter form subscription. I want to keep the form simple make the procedure fast so I do not use a captcha but an hidden form to trap bots.
Is it efficient or bots know how to recognize an hidden form and will bypass it?
An old question, but sharing my experience here, which I recently implemented.
Create some input elements which use CSS class for hiding.
//Element to detect spam
<input
type="text"
name="email"
class="hide_me"
id="email"
/>
//Real element
<input
type="text"
name="customer_email"
id="customer_email"
placeholder="Your Email"
/>
// CSS style to hide the element
.hide_me{
opacity: 0;
position: absolute;
top: 0;
left: 0;
height: 0;
width: 0;
z-index: -1;
}
Use javascript to check if the email field is filled. If it is filled, it is not a real person and form submission should not be done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With