Buy Now
Sign in

HoneyPot Spam and empty forms

pixelhexe , October 26 2015
I altered my spam check to the honeypot spam check because it seems to be very user friendly.

Since this step there are empty form submissions every now and then. I already figured out that the submissions come from crawler bots which I try to ban with the "banned_ip method" as described on this page

I am just wondering if - instead of listing several IPs - it would be easier to add to the custom code action of the honeypot spam an additional query of a required field - so that this is not only checked by the javascript validation method but also by php.
For example if your form has a required email field with name "email" you could add to the default custom code of the honeypot spam
|| $form->data['email'] == ''
as follows:

if ( $form->data['confirm'] != '' || $form->data['email'] == '' ) {

... wrong or right?

Best regards
from a very constant and satisfied ChronoForms user :-)
Hi pixelhexe,

That should work OK. Here's a slightly updated version of the code
if ( !empty($form->data['confirm']) || empty($form->data['email']) ) {
$app = JFactory::getApplication();

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
Fine, and thanks for the improvement, Bob!