3

I know I am able to send to multiple recipients for any given form submission. I am curious if there is a way to send to different addresses given user input.

For example, I have a drop-down on my site that chooses the department. If I choose "support", I would like to send the notification to "[email protected]". But, if the users chooses "other", I'd like to send the email to "[email protected]"

1 Answer 1

3

This can be done with Sprout Forms and the Sprout Fields Email Select Field.

The Email Select field allows you to create a dropdown list of email addresses, hides those email addresses on the front-end so they can't be seen or harvested for spam (the user will only see the Name of each department or discipline you wish to have associated with each email address), and makes the selected email address available after the user submits the form so that you can use that value to trigger an email address using Sprout Forms default notifications or Sprout Email Notifications.


Legacy Answer:

As of Sprout Forms v1.1.0 and the current public plugins available (none that I know of for this use case), you can do this with a Dropdown Field.

Let's say you have a dropdown field with the handle departmentEmailDropdown. In the settings, you can create a list of People/Departments and the emails you'd like them to be sent to:

Label    Value
Support  [email protected]
Other    [email protected]

When a user submits your form, all the values in the form are available for you to reference in your notification settings using shorthand syntax.

In the Email Recipients field of your Notifications tab, you can reference your dropdown field using the syntax {departmentEmailDropdown}.

The downsides to this approach are that the email addresses in your dropdown will be visible to in your page template, so robots can swoop in and gobble them up.

We've got this on our radar and in the next couple weeks should have an update for you that will allow you to handle this as well as obfuscate the email addresses on the front-end. I'll update this answer when we have that ready.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.