I have a form that has a select box with several different options. I want the recipient's email address if the user selects a certain option.
Here is some kind of ASP pseudocode, I just need help grabbing the data from my form. Do I need to use jQuery/JavaScript to do so, or is a different way?
<%
Dim selectedoption
Dim specialoption
if selectedoption="specialoption" then #this would pull data from form
varrecipient = "ImSpecial@domain.com" #this would pull data from form
else
varrecipient = "NotSoSpecial@domain.com"
else if
varFormName = "ContactFormName"
varRHBusinessUnit = "Business1"
varLanguage = "ENGLISH"
varCourtesyResponse = "Y"
varRedirect = "#noredir?formRun=true"
varSubject = "Subject of my Form"
%>
FORM:
<form style="width: 530px;" method="post" name="contactFormName" enctype="application/x-www-form-urlencoded" onsubmit="return validateForm()">
<input type="hidden" name="Redirect" value="/thankyou.htm" />
<input type="hidden" name="Subject" value="Subject of my form" />
<label>First Name<sup> ‡</sup></label>
<input name="sFName" type="text" size="40" value="<%= Server.HTMLEncode(Request.Form("sFName")) %>">
<label>Last Name<sup> ‡</sup></label>
<input name="sLName" type="text" size="40" value="<%= Server.HTMLEncode(Request.Form("sLName")) %>">
<label>Company/ Organization<sup> ‡</sup></label>
<input name="sCName" type="text" size="40" value="<%= Server.HTMLEncode(Request.Form("sCName")) %>" >
<label>Company Type<sup> ‡</sup></label>
<select name="sCType">
<option value="Brand">Brand</option>
<option value="Retailer">Retailer</option>
<option value="Converter">Converter</option>
<option value="Other">Other</option>
</select>
<label>Email<sup> ‡</sup></label>
<input name="sEmail" type="text" size="40" value="<%= Server.HTMLEncode(Request.Form("sEmail")) %>" >
<input type="submit" class="fbutton" value="Send" />
</form>