Hello, I use this spam-blocker validation:
https://www.chronoengine.com/faqs/70-chronoforms/cfv5/5285-how-can-i-add-a-spam-blocker-validation
It works fine, but after validation the form nonetheless is sending the message.
I would really appreciate your help.
Best, Jens
https://www.chronoengine.com/faqs/70-chronoforms/cfv5/5285-how-can-i-add-a-spam-blocker-validation
It works fine, but after validation the form nonetheless is sending the message.
I would really appreciate your help.
Best, Jens
Hi Jens,
The Event Switcher action needs to be before the Email action for this to work.
Bob
The Event Switcher action needs to be before the Email action for this to work.
Bob
Hello Bob,
many thanks for your quick response. You are right, that's it.
I know, if this is not a PHP lesson, but concerning this line:
$result = $filter->check_text($form->data['questions']);
Is it possible to validate more than one field?
Sorry for that.
Best, Jens
many thanks for your quick response. You are right, that's it.
I know, if this is not a PHP lesson, but concerning this line:
$result = $filter->check_text($form->data['questions']);
Is it possible to validate more than one field?
Sorry for that.
Best, Jens
Hi Jens,
You can add an array of input names and then loop through that array at the $results line:
Bob
You can add an array of input names and then loop through that array at the $results line:
. . .You can change the if part to do whatever you need to happen when spam is found.
$check_these = array ( 'name', 'email', . . .);
foreach ( $check_these as $v ) {
if ( $result ) {
// Result contains the matched word (not the matched regular expression)
echo "<p>There is a special place in hell reserved for people who post about '{$result}' on my form!</p>";
return 'spam';
}
}
. . .
Bob
This topic is locked and no more replies can be posted.