Do you need to route messages to different departments? Wish you could conditionally set dynamic recipients based on choices in your form? Formidable Forms does all this and more!
Need a contact form that sends emails to dynamic recipients?
Every contact form plugin that I've ever used sends emails. Nearly all allow you to define CC or BCC recipients as well as your TO address. Formidable Forms does more! Built-in features allow you to dynamically control where messages are routed depending on each individual form entry.
This control of dynamic recipients makes Formidable Forms special
Today I'll examine three main aspects of this feature, and their real world applications.
- Send different messages to each recipient using conditional logic.
- Route the same email to a list of dynamic recipients, using the Separate values approach.
- Send the same email to all recipients using email addresses that were entered in another form with the Dynamic field approach.
Send a different message to each recipient with Conditional Logic
Suppose you have three departments in your company, and a form on your website for people to leave an inquiry. You want to send each department a notification about the inquiry only if it is applicable to them.
Additionally, each message can be individually customized, so each department only receives the details applicable to them, and some information can be excluded for privacy reasons if required.
- In your form, add a field for users to choose the Department they wish to contact. For this example, I'm going to add the options Human resources, Billing and Housekeeping in a Dropdown.
- Next, in your form go to Settings → Form Actions. Then click the Email Notification icon to add new notifications - one for each department.
- Enter the recipient email address in the To box. Then enter your message in the Message box. Repeat this for each department, customizing each message if you wish.
- In each of your email actions, click "Use Conditional Logic". Define the conditional logic so that each email action is only triggered when the matching selection is made by a user in the form. In this example, the email is triggered only when the 'Department' selection is equal to 'Human Resources'. Repeat this for each of your email actions.
- Now, each department will get an email notification only when the submitted inquiry is relevant to their department. Also, when configured, the email content can be unique for each department.
Use Separate Values to route email messages
To send the same email to everyone, but have the recipients change based on a field in your form, you should use Separate Values.
Let's take the same scenario with a company that has three departments. You want to send human resources an email only if it is applicable to them; the same is true for your billing and housekeeping departments. Since the email message will be identical no matter the chosen department, this is simpler to setup. You only need to set up one email action with dynamic recipients.
- As described in the first example, add a dropdown or radio field to your form. Check the option to "Use separate values" in the field options.
- Add the department for the displayed value and the email address for the saved value. When your users fill out the form, they will select the department related to their inquiry.
- In your Form actions, add a new notification and click on the To box. Then click on your dropdown or radio button field in the 'Customization' sidebar to add this field to the To box. Next, add show="value" to the field ID in your To box. Now, selecting "Human Resources" in the department dropdown routes the email only to hr@example.com.
Use Dynamic Fields to set email recipients
Use this method to send the same email notification to all recipients, and have the recipient change based on a field in your form.
A big advantage of this method is that email addresses are hidden. Even when inspecting the code on the page, there is no way to see them. Email addresses dynamically populate using entries from another form.
Again we'll base this example on the same company with three departments. For this method, we require two forms - the Contact Form as usual, and also a Data Form which will hold the list of departments and corresponding email addresses.
- Create a new form titled "Departments" - this is the Data Form. Add two fields: A Single Line Text field for the Department Name, and an Email Address field.
- Add an entry for each option you want your users to select from. For example, 'Human Resources' in the text field and 'hr@example.com' in the email field
- Next, go to your inquiry form and add a 'Dynamic Field'. In the "Import Options From" box select "Entries from a form field", choose your Data Form, and select your "Department Name" field. You can choose to display as Dropdown, Radio buttons, or Checkboxes.
- In your Form Actions, add a new email notification. Select the To box, then click on the "Department Emails" field in the Customization sidebar to add this field to the list of email recipients. Now selecting human resources as the department routes the email notification to the HR inbox.
Read more: Why you should replace HTML email links with email contact forms
Next up: Send emails to multiple addresses
This is just the start of what you can do with Formidable Forms.
You can also send emails to multiple addresses in WordPress using Formidable Forms. This is great for registration forms, booking forms, and so much more! So don't wait any longer, get started with Formidable now!
Did you know that Formidable Forms also has amazing Conditional Redirect features? Combine the two and make your contact forms work harder!
Read more about WordPress email
Try Formidable Forms risk-free with our 14-day money-back guarantee!
Ericson N Moredo says
Hi i want to know how to use.unique with increments on a form.
Also, if the unique field equals to certain numbers, ex. 01, 02, 03.... The email should be routed to agent 01, agent02, agent03...so on.
Let say the unique field is order number.
Thanks
Nathanael Jones says
Hi Ericson,
Can you please open a ticket in our helpdesk with this question: https://formidableformscom.bigscoots-staging.com/new-topic/
Thank you!
milkboy31 says
We use conditional routing all the time on our emails. It's great for customizing who gets what and even what content goes to each person for followup. We haven't dug too deeply into dynamic routing by pulling in contents from another form, but I can see the utility in doing so. For us we just use generic "department based" email addresses so when roles change the email is assigned to the new employee and forms go to the right place still.
massageinlargo@gmail.com says
This is a great way of making a contract with a hidden field (checkbox) and after reviewing it on the back end check the box and then it will send out the email to the person for signing.
jpruitt says
I use dynamic features a ton and Formidable's support has always helped with any issues that I've had.
trishacupra says
I love how the possibilities are always endless with Formidable Pro.
Vartis says
I am looking for an option to allow each user to add a contact form to their profile page, for example, the default WP author template. When the form is sent, it goes to this user email used for registartion. Would it be possible?
srwells says
Hi there, yes this would be possible. you would want to create a field that could contain the email of the "Author" then simply set that field as the "To" address for your email settings.
Vartis says
Oh this is great! Thank you for your reply.
Sorry, forgot to add it in the original question, would same functionality be possible with mail subscription when integrated with Mailchimp?
Possible scenario: i create a subscription form and add it as an option to user profile page as a front end form. The user can turn on/off the box using checkbox. If it's turned on, any visitor can subscribe to a mailing list of this user and not my mailing list as site admin.
Hope it make sence, thank you.
srwells says
Without all the information of your setup, it is hard to definitively say yes or no. Could you please contact our support team from our support page so we can get the additional information we need to determine if this is supported?
Vartis says
I have not purchased the plugin yet, just needed to gather as more info as possible before buying, but i think i'll purchase the pro version anyway. Really appriciate your help, thank you!
srwells says
Understood...One of the options on our help desk is "Pre-sales question" you can still open a new ticket even though you haven't purchased.
kristof says
Can you do routing to an email on postal codes? if yes can I add postal codes with comma seperate values, this could be more than 50 per sales agent?