Trying to filter out spam from an online form. I have a hidden div with an input. The idea is that if something goes into the field, the form will ID the user as a bot and re
In my opinion, a honeypot should consist of ALL of the below:
For instance:
Please leave this blank
Please do not change this field
Using CSS, hide the first field:
.input-field { display: none; }
Using jQuery, hide the second field:
$('.text-field').hide();
// or
$('.text-field').addClass('hide');
Then a couple of very simple checks in PHP:
if($_POST['contact'] == '' && $_POST['email'] == 'your@email.com') {
// Not a bot
}