I'm using UserForms on a couple of SS_powered website and I must say its very practical and allows me to quickly create a good contact form that allow visitors of the website to send email to my customer.
Would it be possible to add a condition to a dropdown that would direct a given message to a specified email address ?
if visitor selects option "a" in dropdown in contact form, email is sent to "email address x"
if visitor selects option "b", email is sent to "email address y" and so on ?
I once needed exactly the same, make userforms send a email to a email address depending on what topic is selected in the dropdown
I forked userforms
even have an open pull request, but I don't mind willr not taking it, my code sucks :D
inline CSS + JS, had no other choice at that time, was in a hurry and had no time for clean coding
create a userforms page.
create a dropdown field.
add some values to the dropdown field.
You will notice there are now 2 fields, 1 is the label, the 2nd one the value (in our case the email should be the value)
save the page
go to the tab where you can select emails that get sent onsubmit.
there you have an option to send it to a email adress or you can select one of the fields from the dropdown.
in this dropdown you should see the name of the dropdown that you created in the form, select that, and save it.
if a user now uses the form and submits it, the email will be sent to the email adress selected.
NOTE: as said its not nice coded, and not fully tested yet, it might happen that you run into errors, for example if the user sends the form but has no email selected in the dropdown. (i just made the dropdown required to go around that).
Zauberfisch: i deployed for my client and it looks promising.
Just one question, is it possible to give 2 values for 1 option ? in other words, so that when visitor of website chooses one option, message is sent to two email receipients ?