Forums

Dynamic to email field based on dropdown selection ?

Turtle 17 Jul, 2014
Hi everyone,

Despite my searches i am unable to find how to do the following :
The form is working with a DB listing various hotels and containing their name and email mail address.
In the form the user is supposed to select a name in a dropdown, the available names are loaded from the DB.

So far, no problem. Now what i'd like to do would be to automatically send an email to the concerned hotel when the form is submitted, by taking the email address from the corresponding line in my DB.

Any idea how i could do this ?

A little help would be deeply appreciated !
GreyHead 17 Jul, 2014
Hi Turtle,

Which part isn't working? You have the hotel name or ID in the submitted form data I guess?

Bob
Turtle 17 Jul, 2014
Hi Bob,

Yes, the ID, the hotel's name & the hotelkeeper's email adress are loaded from the DB through DB multi record loader.
The dynamic dropdown is working well, I just do not understand how I shall fill the dynamic to field in the email parameters so it would send an email to the hotelkeeper.
GreyHead 17 Jul, 2014
Answer
Hi Turtle,

Use a DB Load action to look up the email address from ID of the selected hotel. Then add that value to the Dynamic TO box of the Email action.

Bob
Turtle 21 Jul, 2014
Hi Bob,

I still do not understand how to look up the email address from the ID of the selected hotel.
I've put a DB record loader in the on submit section but I'm unable to make it match the dropdown selection.

It might be a stupid question, apologies for that, but I'm totally new in this area !

Thanks for your help.
GreyHead 23 Jul, 2014
Hi Turtle,

What is the form data that gives you the Hotel ID (you can see that from a Debugger action)?

What settings do you currently have in the DB Read action?

Bob
Turtle 24 Jul, 2014
Hi Bob,

Thanks a lot !

After looking at the Debugger report I understood why it wouldn't work as expected, I put the wrong parameters in the DB record loader the whole time.

Guess I really did not understand your first answer !

Problem solved, thanks again.
This topic is locked and no more replies can be posted.