Hello. I’m trying to create a “Contact Us” page with a form the user can fill out on the page. Simple enough. The trick is that there is a dropdown that determines which email address the form data will be sent to. Do I need to create a separate form for each email then decide before the form is submitted, which form id to send it to?
I guess a more general question is, what happens after a form is submitted? I’ve been trying to figure this out and it seems as if the information is saved somewhere and an email is sent. Is that correct? Do I have any control over this, like choosing the email when the form comes in?
First (and most likely the easiest one): Set up a workflow with an if/else statement like “if property X equals option Y send it to mail adress Z”. You can have several/unlimited if/else statements.
Second(great for sorting/filtering): Set up a workflow to associate prospects/leads to certain lists based on the choice of the property. Then add the if/else statement like “if is in list A - send to email A, if is in list B - send to email B…”
Third(not recommended but possible): create a custom module, put the embed code into it, modify the embedcode and write your own onFormSubmit rules with JavaScript.
I’ve already tried with the sorting option, and I get the list of options. The problem is any way I try to send an email, I do not find any option that would allow me to set either a “from” address or include the message from the contact form in the email.
I originally was going to go with the third option, but I don’t see how to send an email from the module’s javascript. That’s why I was curious about the APIs.