Dynamically change email recipient in webform based on dropdown list I have a reservation form for booking restaurants. All restaurants are added dynamically into the webform using Webform Views Select.

When the user selects resturant1, that restaurant should get an email of the reservation. Restaurants are nodes and, when I add them, I add an email field too, so this is in the database. But still I can't figure out how to make this work. 

I know I need to use rules but I'm not really sure how to set it up.
I assume the view you are using creates an option list of key|value pairs of the form nid|Restaurant name. For this answer, I will call your select element restaurant.


Install and activate the Webform node value module. This is a new module, and you will have to apply this patch. (If you are not familiar with patches have a look at Applying Patches.)
Edit your webform, and under Form components create a "Hidden" webform element called send_to_email.
Under E-mails add Component value: send_to_email as the to address.
Under Form settings go to the bottom and open the Set Value From A Node group.


The Path To Node is From webform field.
Since the key returned is nid, set the Path Alias Prefix to node/ so the nodes can be found using node/nid as the path.
The Webform Source Field is restaurant (your select element).
If the field containing the email address of the restaurant is $node->field_email, set the Node Source Field to field_email.
The Webform Target Field is send_to_email.