Buy Now
Sign in

[ChronoForms 6] How to insert code in Event Switcher?

danielitob , February 06 2020, 18:04
D
danielitob 120
February 06 2020, 18:04 #391059
Hello,
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');
$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';
}
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.spam.PNG
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
healyhatman 9
February 06 2020, 22:53 #391062
Need to see your event switcher settings itself not just the branches
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
D
danielitob 120
February 07 2020, 06:48 #391067
Hi, thanks for reply.
I attach the event switcher settings, that invoke 2 different eventsevent_switcher.PNG
Thanks very much, i hope you can help me!
Attachments
event_switcher.PNG
event_switcher.PNG
(36.18 KiB)
67 Downloads/Views
healyhatman 9
February 07 2020, 06:49 #391068
{var:checkSpam}
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
D
danielitob 120
February 07 2020, 08:37 #391071
thanks, it works!
best regards