3

I need to give users the ability to be able to choose which channel of the company their message goes to, i.e. General Inquiries, Estimates etc. using the P&T Contact Form Plugin and a select box. How would I be able to make that work?

Thanks!

3

A custom dropdown that allows you to trigger emails to different departments is possible using Sprout Forms and the Sprout Fields Email Select field.

2

There isn't a way to do this natively with the plugin, so you'd end up having to fork the plugin and adding your own custom business logic.

Currently the plugin is set to only send to one "To Email" globally under its settings.

Your fork would probably need to change that in the settings page to a dropdown for each of your defined sections and to be able to specify an email address for each one.

  • @brad something like this isn't possible? <select name="toEmail"> <option value="example@me.com">General</option> <option value="example2@me.com">Bookings</option> </select> – John Johnson Sep 19 '16 at 15:42
1

It is possible to do this, on a website with Craft 2 I used the following

     <div class="select-wrapper">
     <select name="toEmail" id="toEmail">
     <option value="">- Velg -</option>
     <option value="{{ 'email@address.com'|hash }}">Name of recipient</option>
     <option value="{{ 'email@address.com'|hash }}">Name of recipient</option>
     <option value="{{ 'email@address.com'|hash}}">Name of recipient</option>
     <option value="{{ 'email@address.com'|hash }}">Name of recipient</option>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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