Hello,
i have a php with name "checkspam" that return 2 value, "spam" and "nospam".![[ChronoForms 6] How to insert code in Event Switcher? image 1](spam.PNG)
This is my debugger:
Could you help me? Thanks in advance,
regards
Daniele
i have a php with name "checkspam" that return 2 value, "spam" and "nospam".
include (JPATH_SITE.'/components/com_chronoforms6/extras/php-spam-filter-master/spamfilter.php');Then I have a Event Switcher, with 2 different events (spam and nospam). I attach a screenshot for better clarification. If i enter in event "nospam", the message "message37" doesn't appear.
$blacklists = array(
'blacklist-misc.txt',
'blacklist-medication.txt',
);
$filter = new SpamFilter($blacklists);
$result = $filter->check_text($this->data['messaggio']);
if ( $result ) {
return 'spam';
} else
{
return 'nospam';
}
This is my debugger:
Array ( [option] => com_chronoforms6 [cont] => manager [chronoform] => form-test-spam [event] => submit [messaggio] => test [button45] => )
Array ( [checkspam] => Array ( [returned] => nospam [var] => nospam ) )
Could you help me? Thanks in advance,
regards
Daniele
Need to see your event switcher settings itself not just the branches
Hi, thanks for reply.
I attach the event switcher settings, that invoke 2 different events![[ChronoForms 6] How to insert code in Event Switcher? image 2](event_switcher.PNG)
Thanks very much, i hope you can help me!
I attach the event switcher settings, that invoke 2 different events
Thanks very much, i hope you can help me!
{var:checkSpam}
thanks, it works!
best regards
best regards
This topic is locked and no more replies can be posted.