Forum Moderators: open
I am a web author in a staff development department at a univeristy and I am currently working on workshop booking forms.
The form I will be working on next will contain information on several different workshops being hosted by different departments which means that the booking contact is going to be different for each workshop.
I was wondering if it is possible to direct a form, once submitted, to a specific person(s) depending on which groups of radiobuttons have been selected.
I should point out that to guard our branding we have no control over external parts of forms (eg. cgi-bin/sendmail.pl).
I understand the risk of spambots and all that jazz but the restrictions we face leave us with only a basic ability meaning that mail adresses will need to be referenced within the HTML.
Hope this makes sense!
Kelly
Generally, the form handler script, whether .asp or .php, can include an 'if' statement that 'if form field X is selected, email to ...', 'if form field y is selected, email to...'.
Not knowing how your form handler reads, I can only offer this limited answer. The exact semantics would depend on the form.
Marshall
<input type="hidden" name="recipient" value="some_email@example.com">
It's an easy thing to change it to this:
<select name="recipient" id="recipient">
<option value="johndoe@example.com">John Doe</option>
<option value="marydoe@example.com">Mary Doe</option>
</select>
Even better, if you do have access to a server side processor, you do this:
<select name="recipient" id="recipient">
<option value="1">John Doe</option>
<option value="2">Mary Doe</option>
</select>
then in your form processor, you have a list that associates 1 with johndoe@ and 2 with marydoe@.