How do you change the email recipient of drupal 7 webform based on checkbox value using hook form alter? How do you change the email recipient of drupal 7 webform based on checkbox value using hook form alter?
I have a group of checkboxes (Texas, DC, Maryland, Virginia). I would like to change the recipient if Texas is checked and use the default for the other options. I do not want to change the key of the checkbox component to the Texas email address because I need to state which location was selected in the email template.
You do not need to use hook_form_alter for this, you can set this up in Webform on admin, here is how:


Go to the Edit interface of your webform
Go to E-mails
At the bottom, choose 'Component value' and choose your checkbox field, click Add http://cl.ly/image/1K3V2N3k3q30
At 'Component e-mail options' you can specify an email address for each option http://cl.ly/image/1g3c1r15060r


Description below says:

"You may enter an e-mail address for each choice. When that choice is selected, an e-mail will be sent to the corresponding address. If a field is left blank, no e-mail will be sent for that option."