Buy Now
Sign in

How to set different actions based on dropdown choice

giulia72 , January 12 2017
giulia72 122
January 12 2017 #364163
In reference to my topic:

I would to ask a paid service to realize it.

The missing part is Event switcher and the actions to send 2 different emails based on country/department selection

Form and db table has been created

I would a simple solution that for me will be easy to manage in the future

Please let me know

it is very urgent

Thank you
admin 27.0
January 12 2017 #364166
Hi Giulia,

If you drag an "Event switcher" to your "submit" event, it has 2 events, success and fail, all you have to do is to write some PHP code which returns either "success" or "fail", example:

if($form->data["country"] == "france"){
return "success";
return "fail";

Now you can drag an email action in the "success" event, and another email in the "fail" event, and customize them to your liking, the email in the "success" event will be sent to users who selected "france" in the country field.

Best regards,
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
giulia72 122
January 12 2017 #364167
Hi Max
it is not exactly I have requested.
As I have described in details in my precedent posts:
the country is selected by a list of all worldwide countries from a list box in the form.
Based on the country the user will be allowed/not allowed to receive a download file.

If he is ok, he will receive by email a file and the same email will be sent to 2 other users
If it is not ok, he will receive a different email (no file attached) and the same email will be sent to 2 other users

Only if the Country = France , the user must select an area (tipically for France zone) and based on this area it will be a different action (as above).

The list of contries-department-allowed yes/no- email 1- email2 is stored in a db table of SQL

For this reason I have asked to Bob as so far he knows all the story

I don't know php and I have asked a paid service if it is not so expensive
It should not take so much time for who knows pho and Chronoforms
Also I have just created my form , db table and I need only to set the actions

Could you help me?
giulia72 122
January 12 2017 #364186
I hope to receive an answer within this week, as I have to decide to continue to use this component or not

Please an answer is appreciated

thank you