I have a dropdown select field where user can or not select a value.
- If user do not select any value, only the main email action will be sent out
- If user select value 1 then main email action and email1 action will be executed on form submit
- If user select value 2 then main email action and email2 action will be executed on form submit
How to?
I think this should not be a problem. Just create an event as per selection and enable or disable the selections as per your desire.
Then add 2 actions for emails 1 & 2, control their processing with the "Run Conditions" behavior under the "Data" behaviors section!
You will need to use something like this in the conditions:
{data:select_field_name} = 1 (or 2)
BUT, how does ist work with a Checkbox Field with multibple Lines? Can I do something similar like the {data:select_field_name} = 1 (or 2)?
I want to send a Emal for each condition, i tried it with "==" and with "match" but nothing works.
DO you have an Idea?
1 in {data:checkboxes_field_name}
2 in {data:checkboxes_field_name}
and change the "All rules match" to "Any rules match"
So what I want is the same as at the Beginning with the Radio Box (which worked perfectly), but with CheckboxES with several Options (not Radio, not Checkbox). The User can choose option 1 oder Option 2 or both. In Checkboxes Field I Did this:
Name checkboxes_test
ck1 ---> Option 1
ck2----> Option 2
In the End_page Section (after the Submit) I insert two Mail Action with run condition in each to grab the Values I did it like you said
{data:checkboxes_test} == ck1
and the second Mail
{data:checkboxes_test} == ck2
(this ist how it worked with Radio)
BUT now with Checkboxes it doesn't work. It sounds normal for me, because the Radio field ist different. I found out that there ist a problem with the comparison operator or with the Call "{data:...} SO I tried comparison operator "IN" and "Match" no result, with "not empty" it will work, but this ist not specific enough for me.....
data: does not grab the correct information because the checkboxes gives back an array like this :
[checkboxes_test] => Array ( [0] => ck1 )
The Radio Box ist different like this (of course, because checkboxes can have many posibilities, radios just one):
[radiobox_name] => opt1
So what I need ist the correct call to make a correct Comparison, it must be different to {data:checkboxes_test} or do you have an Idea for the correct systax of the comparision in the run condition. I am sure this ist interesseting for all, because not everyone uses radioboxes, sometimes you need checkboxes to send out the correct mail and it is truely a genius Idea to combine sending Emails with run conditions... this makes thins possible like "What Webinar do you want to visit" and you can send entirely different mails with attachements and infos and so on, really great, so maybe we get it working even for checkboxes!
thx so much!
ck1 IN {data:checkboxes_test}Does that work ?
you should start the condition with the value, because of the array!
Hello,
In CF8 there is no "Run Conditions" in the Behaviors section.
How can that be realised in CF8?
Regards,
Peter
You would need to use the PHP events behavior. Here's a link with more info.
In short, you create a PHP action, and enter an event (which I'm assuming the name must match the return value from the PHP statement)
When you save it rebuilds with the name of the event as a section you can drop whatever you need in.
https://www.chronoengine.com/forums/topics/view/111228/cf8-run-conditions-for-actions
I haven't used this myself yet, but I'm starting to look at what I would need to do to move from CF7 to CF8.