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!
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.
Sign up to join this communityI 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!
A custom dropdown that allows you to trigger emails to different departments is possible using Sprout Forms and the Sprout Fields Email Select field.
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.
<select name="toEmail"> <option value="example@me.com">General</option> <option value="example2@me.com">Bookings</option> </select>
Sep 19, 2016 at 15:42
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>