Buy Now
Sign in

HoneyPot Spam and empty forms

pixelhexe , October 26 2015
P
pixelhexe
I altered my spam check to the honeypot spam check because it seems to be very user friendly.
https://www.chronoengine.com/faqs/55-cfv4/cfv4-anti-spam/2699-how-can-i-add-a-honeypot-spam-check.html

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
https://www.chronoengine.com/faqs/55-cfv4/cfv4-anti-spam/2601-how-can-i-stop-spam-from-my-form.html

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:

<?php
if ( $form->data['confirm'] != '' || $form->data['email'] == '' ) {
$mainframe->redirect('http://www.ic3.gov/default.aspx');
}
?>


... wrong or right?

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

That should work OK. Here's a slightly updated version of the code
<?php
if ( !empty($form->data['confirm']) || empty($form->data['email']) ) {
$app = JFactory::getApplication();
$app->redirect('http://www.ic3.gov/default.aspx');
}
?>

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