I have always used Freeform for a single form.
For a new project, I need the user to be able to choose two different organisations in a select field. Depending on the option selected the admin email notification needs to be send to one of two email addresses.
I tried using the following code which I made following some of the example documentation on the freeform site, but I am not sure if this is what its meant for.
{exp:freeform:form
form_id="1"
required="name|email|message"
recipients="yes"
recipient_limit="2"
recipient_template="admin_notification"
recipient1="Name 1|email@domain1.com"
recipient2="Name 2||email@domain2.com""
}
<p>
<select name="recipient_email" />
{freeform:recipients}
<option value="{freeform:recipient_value}">
{freeform:recipient_name}
</option>
{/freeform:recipients}
</select>
</p>
<p>Your Name: <input type="text" name="name" /></p>
<p>Your Email: <input type="text" name="email" /></p>
<p>Your Message: <textarea name="message"></textarea></p>
<input type="submit" value="Submit" name="Submit" />
{/exp:freeform:form}
Can anyone tell me if this is the best route, as it doesn't appear to work as I had hoped. Do I remove the email in the control panel for admin notification? or leave an email there?
Thanks