How to set different actions based on dropdown choice

giulia72 , January 12 at 07:48
g
giulia72

Hi
In reference to my topic: https://www.chronoengine.com/forums/posts/f5/t102685/how-to-set-different-actions-based-on-dropdown-choice.html

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
Giulia

admin

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:

				
<?php
if($form->data["country"] == "france"){
return "success";
}else{
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,
Max

g
giulia72

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?

g
giulia72

Hi
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

Powered by ChronoForums - ChronoEngine.com

ChronoForms Book

The ChronoForms Book, written for ChronoForms v3 contains 350 pages of invaluable ChronoForms How-tos hints and tips.

Note: many of the ideas can be used in ChronoForms v4 but the admin interface is very different and code examples may need to be modified.

SSL

Members Login

 

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com