Someone already figured out how to use the If Conditions Element?

Proximate 07 Jun, 2019
With the new ChronoForms i found this intresting If Conditions Element. But i am not able to set it up.

I would like a Condition Change based on a read Data:
Debug of read:
[read_data1] => Array
        (
            [log] => Array
                (
                    [0] => SELECT COUNT(`Events`.`aid`) AS `Events.count` FROM `events` AS `Events` WHERE `Events`.`active` = '1' LIMIT 100;
                )

            [var] => 1
        )
Yes is that simple first i just want to show a message if there is no (var=0) one or more events active.
var can be 0 to x

In the If Conditions Element i tried already {var:read_data1} and var:read_data1 without success
Value 1 "greater than" 1
Value 1 "matches" 1
Value 1 "matches" 0

It always shows me the first condition as true...

Thanks for your response
Proximate 07 Jun, 2019
ha now i got a PHP Error...
Warning: preg_match(): Delimiter must not be alphanumeric or backslash in *path*/public_html/libraries/cegcore2/admin/extensions/chronofc/functions/if_conditions/if_conditions_output.php on line 24

i've tried with the following setup:

1 "greater than" 1
1 "matches" 1
1 "matches" 0
(just to test)

so i just don't get how this thing should work...
healyhatman 08 Jun, 2019
I use it fairly regularly. Can you post a screenshot of your if-conditions setup please?

Also if you just want one thing shown if there are no records and something else shown if there are more, you can just use an event switcher, with {var:read_data1} and your conditions would be
0
*

You could also just do a normal read_data to get your data, and use {var.empty:read_data#} in your event switch with true / false
Proximate 08 Jun, 2019
hi healyhatman

here are the screenshots:
The Read Action:
Someone already figured out how to use the If Conditions Element? image 1

The ifCondition:Someone already figured out how to use the If Conditions Element? image 2


And the Result:

Someone already figured out how to use the If Conditions Element? image 3

in the end this form should be an event registration form. which allows guests to register a team (and its members) to an event - but first i would like to show a dropdown for available events (if there are more than one.

thanks for your help

kind regards
healyhatman 08 Jun, 2019
Answer
Use event switch, with

0
1
*
Max_admin 09 Jun, 2019
For the if conditions, do you have the latest update installed ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Proximate 09 Jun, 2019
@healyhatman: Thanks i will try it so
@Max: yes i think:
Search does not show me available updates
Component : 6.4.1
Module: 6.0.1
Package: 6.1.2

kind regards
This topic is locked and no more replies can be posted.