Website owners love contact forms, because they allow us to capture important information up front. Having answers to the questions of who, why and what saves a lot of time.
Of course, people will have different reasons for filling out your contact form. A prospect may have pre-sales questions about your products and services. An existing customer may have a billing inquiry, or they might need technical support. Different team members or departments need to handle these inquiries.
Most of the time, contact forms are routed to a single email address. This is often a generic mailbox like info@. The person or team responsible for this mailbox has to evaluate the incoming message, determine who should be involved, and then forward it to the correct recipient(s). This adds time and delay. Wouldn’t it be easier to send form submissions to the right person or department automatically?
Enter the Ninja Forms Conditional Logic Add-On. This extension allows us to set up rules for our contact forms. We can use these rules to trigger different Form Actions based on user input.
Part 1: Setting up a department selector field
Our first step is to create a form field that will be used to determine the email recipients. Take the following steps:
- Open your form in the Ninja Forms form editor and select the Form Fields tab.
- Add a Select field to your form. Set its Label to How can we help you?
- In the field editor, set the following options:
- Label: I need technical support, Value: support
- Label: I have a pre-sales question, Value: sales
- Label: I have a billing inquiry, Value: billing
- Click Done.
Part 2: Setting up form actions
Once we have our department selector, it’s time to set up our Form Actions.
- Click the Emails & Actions tab in the Ninja Forms form builder.
- Click the + icon to add a new form action, and choose the Email action type.
- For the action name, enter Support Inquiry.
- Customize the To and Reply To fields with the email address of your support team.
- In the Subject field, enter Support Inquiry.
- In the Email Message field, ensure that this field contains the
{fields_table}
placeholder, or customize this field as desired. - Now for the important part. When the Ninja Forms Conditional Fields add-on is installed and activated, you’ll see a Conditional Logic section at the bottom of the Form Action editor. Expand the Conditional Logic section, and set a rule with the following details:
- Process This when All > How can we help you? > Has Selected > support
- Repeat steps 1 through 7, creating Email Actions with Conditional Logic for each of the additional field values (sales and billing), and customizing the actions to send results to the respective contacts for each of those departments.
- Test your form 3 times, ensuring that form submissions for each selection are routed to the correct recipients.