CF8 Run Conditions for Actions?

kgriffin 27 Jul, 2024

Hello-

I need to be able to trigger a save data action only if certain conditions are true from the form data (age of user is 18 or older). Chronoforms 7 has Run Conditions for this. What do I use for Chronoforms 8?

Max_admin 11 Aug, 2024

using a PHP events behavior, you do your conditions check using PHP code, check for data with $this->data("field_name"), variables with $this->get("var_name")

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mgergel 14 Aug, 2024

Max- 

Can you be so kind as to elaborate on this? For example I have a custom PHP action that looks at a checkbox and returns T/F. How do I link that to my Save_Data10 action so that it only saves the data if the checkbox is checked? I see in the PHP an "Event" behavior is that what is used or something else. Thank you in advance for your time.

Max_admin 20 Aug, 2024

Hi mgergel

After you enable the Events behavior in PHP and define your events as T,F, save the form to rebuild the PHP action with events, then you can put your Save Data action in T event

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 09 Nov, 2024
Answer

Run conditions added to v8.0.24

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.

VPS & Email Hosting 20% discount
hostinger