I’ve been trying to figure this out for a month or so now with no luck whatsoever.
I’m using FreeForm for our company’s site in which the user should be able to choose what department they want to get in contact with. I’m looking to have a simple drop down select menu with the different department names and the corresponding email addresses for each department. After the user selects which department they want to get in contact with, that department’s email address will be notified the same way I would be notified if I filled in the “notify” parameter with my own email
Here is what I’ve got so far:
{exp:freeform:form form_id="contact" return="static/thank-you" required="name|email|subject|message" template="contact_form"}
<select name="recipients" id="recipients">
<option selected="selected">-- Deliver To --</option>
<option value="<?php echo base64_encode('department_email_address'); ?>">Department 1</option>
<option value="<?php echo base64_encode('department_email_address'); ?>">Department 2</option>
<option value="<?php echo base64_encode('department_email_address'); ?>">Department 3</option>
</select>
<div class="contactfield"><label for="name">Your name:</label> <span class="requiredfield">(required)</span><br />
<input type="text" class="required validate-alpha" id="name" name="name" />
</div>
<div class="contactfield"><label for="email">Your e-mail address:</label> <span class="requiredfield">(required)</span><br />
<input type="text" class="required validate-email" id="email" name="email" />
</div>
<div class="contactfield"><label for="subject">Subject:</label> <span class="requiredfield">(required)</span><br />
<input type="text" class="required" name="subject" id="subject" />
</div>
<div class="contactfield"><label for="message">Message:</label> <span class="requiredfield">(required)</span><br />
<textarea class="required" name="message" id="message"></textarea>
</div>
<div class="contactfield">
<input type="submit" name="Submit" value="Submit" class="submit" />
</div>
{/exp:freeform:form}
I realize this code will not work, but you can see where I’m trying to go with it. I just can’t get the connection right so that the user can choose the email address (department) they want to contact and have that same email address be the one that is “notified”.
If anyone has any ideas I’d greatly appreciate it.
