sarb
09-08-2008, 05:46 PM
Hi,
I have a form that I want to reuse, but remove a couple fields first.
I know very little ASP programming. The form was created by someone else. I would like to remove the two following fields:
1) Select Preferred Appointment Date and Time:
2) Clinic: Bryan or Houston
I did try removing them, but the e-mail that was sent to me that collects the data still has those two fields listed on it. I thought I had removed everything. When I went a little further trying to clean it up, I destroyed the whole form.
Any help with this would be really appreciated.
The form can be viewed at:
http://www.naturalwavesprogram.com/free_report.asp
The ASP Code is as follows:
<%@ Language=VBScript %>
<%
dim strMessage
function monthCombo()
dim strCmb
dim i
strCmb="<select id=""cmbMonth"" name=""cmbMonth"" onchange=""addDays();""><option value=0>Month</option>"
for i=1 to 12
strCmb = strCmb & "<option value=""" & i & """>" & MonthName(i) & "</option>"
next
strCmb=strCmb & "</select>"
Response.Write strCmb
end function
%>
<%
function dayCombo()
dim strCmb
strCmb="<select id=""cmbDay"" name=""cmbDay""><option value=0>Days</option>"
strCmb=strCmb & "</select>"
Response.Write strCmb
end function
%>
<%
function timeCombo()
%>
<select id="cmbTime" name="cmbTime" >
<option value="0">Time</option>
<option value="7:30 AM">7:30 AM</option>
<option value="8:00 AM">8:00 AM</option>
<option value="8:30 AM">8:30 AM</option>
<option value="9:00 AM">9:00 AM</option>
<option value="9:30 AM">9:30 AM</option>
<option value="10:00 AM">10:00 AM</option>
<option value="10:30 AM">10:30 AM</option>
<option value="11:00 AM">11:00 AM</option>
<option value="11:30 AM">11:30 AM</option>
<option value="12:00 PM">12:00 PM</option>
<option value="12:30 PM">12:30 PM</option>
<option value="1:00 PM">1:00 PM</option>
<option value="1:30 PM">1:30 PM</option>
<option value="2:00 PM">2:00 PM</option>
<option value="2:30 PM">2:30 PM</option>
<option value="3:00 PM">3:00 PM</option>
<option value="3:30 PM">3:30 PM</option>
<option value="4:00 PM">4:00 PM</option>
<option value="4:30 PM">4:30 PM</option>
<option value="5:00 PM">5:00 PM</option>
<option value="5:30 PM">5:30 PM</option>
<option value="6:00 PM">6:00 PM</option>
<option value="6:30 PM">6:30 PM</option>
<option value="7:00 PM">7:00 PM</option>
<option value="7:30 PM">7:30 PM</option>
<option value="8:00 PM">8:00 PM</option>
</select>
<%
end function
%>
<%
if Request.Form("txtName") <> "" then
'
dim objMailer
dim sendTo
dim strResponse
strResponse = "Name: " & Request.form("txtName") & "<br>"
strResponse= strResponse & "Sex: " & Request.form("radSex") & "<br>"
strResponse=strResponse & "Age: " & Request.form("txtAge") & "<br>"
strResponse=strResponse & "Clinic: " & Request.form("radClinic") & "<br>"
if Request.Form("chkWeightLoss") <> "" then
strResponse=strResponse & "Weight Loss: Yes"& "<br>"
else
strResponse=strResponse & "Weight Loss: Not selected"& "<br>"
end if
if Request.Form("chkHormoneBalancing") <> "" then
strResponse=strResponse & "Hormone Balancing: Yes"& "<br>"
else
strResponse=strResponse & "Hormone Balancing: Not selected"& "<br>"
end if
if Request.Form("chkSleepImprovement") <> "" then
strResponse=strResponse & "Sleep Improvement: Yes"& "<br>"
else
strResponse=strResponse & "Sleep Improvement: Not selected"& "<br>"
end if
if Request.Form("chkADD_ADHD") <> "" then
strResponse=strResponse & "ADD & ADHD: Yes"& "<br>"
else
strResponse=strResponse & "ADD & ADHD: Not selected"& "<br>"
end if
if Request.Form("chkOHR") <> "" then
strResponse=strResponse & "Overall Health Restoration: Yes"& "<br>"
else
strResponse=strResponse & "Overall Health Restoration: Not selected"& "<br>"
end if
strResponse=strResponse & "Phone: " & Request.form("txtPhone") & "<br>"
strResponse=strResponse & "Email: " & Request.form("txtEmail") & "<br>"
if Request.form("cmbMonth") <> "" and Request.form("cmbMonth") <> "0" then
tMonthName=MonthName(Request.form("cmbMonth"))
else
tMonthName="-"
end if
strResponse=strResponse & "Requested appointment: " & tMonthName & ", " & Request.form("cmbDay") & " " & Request.form("cmbTime") & "<br>"
strResponse=strResponse & "Comments: " & Request.form("txtComments") & "<br>"
if Request.Form("radClinic") = "Bryan" then
sendTo="s-barrick@suddenlink.net"
else
sendTo="s-barrick@suddenlink.net"
end if
Set objMailer = Server.CreateObject("SMTPsvg.Mailer")
fromEmail="inquiry@naturalwavesprogram.com"
objMailer.FromName = fromEmail
objMailer.FromAddress= fromEmail
objMailer.RemoteHost = "localhost"
objMailer.Subject = "FREE Report Request"
objMailer.AddRecipient sendTo, sendTo
objMailer.ContentType = "text/html"
objMailer.BodyText = strResponse
if objMailer.SendMail then
strMessage="Your Appointment Request has been successfully submitted. We will get back to you soon. Thanks."
else
strMessage="Message could not be sent, pls. try again later."
end if
end if
%>
Any help you might be able to provide would be really appreciated.
Thanks,
Sarb
I have a form that I want to reuse, but remove a couple fields first.
I know very little ASP programming. The form was created by someone else. I would like to remove the two following fields:
1) Select Preferred Appointment Date and Time:
2) Clinic: Bryan or Houston
I did try removing them, but the e-mail that was sent to me that collects the data still has those two fields listed on it. I thought I had removed everything. When I went a little further trying to clean it up, I destroyed the whole form.
Any help with this would be really appreciated.
The form can be viewed at:
http://www.naturalwavesprogram.com/free_report.asp
The ASP Code is as follows:
<%@ Language=VBScript %>
<%
dim strMessage
function monthCombo()
dim strCmb
dim i
strCmb="<select id=""cmbMonth"" name=""cmbMonth"" onchange=""addDays();""><option value=0>Month</option>"
for i=1 to 12
strCmb = strCmb & "<option value=""" & i & """>" & MonthName(i) & "</option>"
next
strCmb=strCmb & "</select>"
Response.Write strCmb
end function
%>
<%
function dayCombo()
dim strCmb
strCmb="<select id=""cmbDay"" name=""cmbDay""><option value=0>Days</option>"
strCmb=strCmb & "</select>"
Response.Write strCmb
end function
%>
<%
function timeCombo()
%>
<select id="cmbTime" name="cmbTime" >
<option value="0">Time</option>
<option value="7:30 AM">7:30 AM</option>
<option value="8:00 AM">8:00 AM</option>
<option value="8:30 AM">8:30 AM</option>
<option value="9:00 AM">9:00 AM</option>
<option value="9:30 AM">9:30 AM</option>
<option value="10:00 AM">10:00 AM</option>
<option value="10:30 AM">10:30 AM</option>
<option value="11:00 AM">11:00 AM</option>
<option value="11:30 AM">11:30 AM</option>
<option value="12:00 PM">12:00 PM</option>
<option value="12:30 PM">12:30 PM</option>
<option value="1:00 PM">1:00 PM</option>
<option value="1:30 PM">1:30 PM</option>
<option value="2:00 PM">2:00 PM</option>
<option value="2:30 PM">2:30 PM</option>
<option value="3:00 PM">3:00 PM</option>
<option value="3:30 PM">3:30 PM</option>
<option value="4:00 PM">4:00 PM</option>
<option value="4:30 PM">4:30 PM</option>
<option value="5:00 PM">5:00 PM</option>
<option value="5:30 PM">5:30 PM</option>
<option value="6:00 PM">6:00 PM</option>
<option value="6:30 PM">6:30 PM</option>
<option value="7:00 PM">7:00 PM</option>
<option value="7:30 PM">7:30 PM</option>
<option value="8:00 PM">8:00 PM</option>
</select>
<%
end function
%>
<%
if Request.Form("txtName") <> "" then
'
dim objMailer
dim sendTo
dim strResponse
strResponse = "Name: " & Request.form("txtName") & "<br>"
strResponse= strResponse & "Sex: " & Request.form("radSex") & "<br>"
strResponse=strResponse & "Age: " & Request.form("txtAge") & "<br>"
strResponse=strResponse & "Clinic: " & Request.form("radClinic") & "<br>"
if Request.Form("chkWeightLoss") <> "" then
strResponse=strResponse & "Weight Loss: Yes"& "<br>"
else
strResponse=strResponse & "Weight Loss: Not selected"& "<br>"
end if
if Request.Form("chkHormoneBalancing") <> "" then
strResponse=strResponse & "Hormone Balancing: Yes"& "<br>"
else
strResponse=strResponse & "Hormone Balancing: Not selected"& "<br>"
end if
if Request.Form("chkSleepImprovement") <> "" then
strResponse=strResponse & "Sleep Improvement: Yes"& "<br>"
else
strResponse=strResponse & "Sleep Improvement: Not selected"& "<br>"
end if
if Request.Form("chkADD_ADHD") <> "" then
strResponse=strResponse & "ADD & ADHD: Yes"& "<br>"
else
strResponse=strResponse & "ADD & ADHD: Not selected"& "<br>"
end if
if Request.Form("chkOHR") <> "" then
strResponse=strResponse & "Overall Health Restoration: Yes"& "<br>"
else
strResponse=strResponse & "Overall Health Restoration: Not selected"& "<br>"
end if
strResponse=strResponse & "Phone: " & Request.form("txtPhone") & "<br>"
strResponse=strResponse & "Email: " & Request.form("txtEmail") & "<br>"
if Request.form("cmbMonth") <> "" and Request.form("cmbMonth") <> "0" then
tMonthName=MonthName(Request.form("cmbMonth"))
else
tMonthName="-"
end if
strResponse=strResponse & "Requested appointment: " & tMonthName & ", " & Request.form("cmbDay") & " " & Request.form("cmbTime") & "<br>"
strResponse=strResponse & "Comments: " & Request.form("txtComments") & "<br>"
if Request.Form("radClinic") = "Bryan" then
sendTo="s-barrick@suddenlink.net"
else
sendTo="s-barrick@suddenlink.net"
end if
Set objMailer = Server.CreateObject("SMTPsvg.Mailer")
fromEmail="inquiry@naturalwavesprogram.com"
objMailer.FromName = fromEmail
objMailer.FromAddress= fromEmail
objMailer.RemoteHost = "localhost"
objMailer.Subject = "FREE Report Request"
objMailer.AddRecipient sendTo, sendTo
objMailer.ContentType = "text/html"
objMailer.BodyText = strResponse
if objMailer.SendMail then
strMessage="Your Appointment Request has been successfully submitted. We will get back to you soon. Thanks."
else
strMessage="Message could not be sent, pls. try again later."
end if
end if
%>
Any help you might be able to provide would be really appreciated.
Thanks,
Sarb