I have a client that I made an email form for....it has quantity boxes next to items people would order (yes, I know a store would be better, but this is what client wants)...anyway, I prefilled those with 0 in the quantity to make the name of the item show next to the quantity ordered....trouble is, client only wants items that someone actually orders to show up, not all 50 of her items with 0 next to them where she has to hunt to locate quantity ordered. It's got to be something simple that can be added to the code to only send those with something not 0 in the quanitity, but I'm not schooled enough in forms....I made an existing one work this way for her and banging my head here.
Anyone with a suggestion.....sample below of code for the form...
tempemail=Request.Form("Email")
if(Request.Form("Email") <> "") then
Set Mailer2 = Server.CreateObject("SMTPsvg.Mailer")
Mailer2.ContentType = "text/html"
Mailer2.RemoteHost = "mail.sample.com"
Mailer2.FromName = "Water Order Form"
Mailer2.FromAddress= tempemail
Mailer2.AddRecipient "Website Order", "order@sample.com"
Mailer2.AddCC "Ed Perks", "edperks@sample.com"
Mailer2.Subject = "Water Website Order Form"
Mailer2.BodyText = "<html><body><b>Website Order:</b>" & "<br>" & "<br>" & "Name: " &Request.Form("name") & "<br>" & "Account Number: " &Request.Form("Account Number") & "<br>" & "Address: " &Request.Form("Address") & "<br>" & "City State Zip: " &Request.Form("CityStateZip") & "<br>" & "Phone: " &Request.Form("Phone") & "<br>" & "Contact Person: " &Request.Form("ContactPerson") & "<br>" & "Email: " &Request.Form("email") & "<br> <br><b><br> Coffee </b><hr> " & "Great Lakes Premium Gold Blend: " &Request.Form("Great Lakes Premium Gold Blend") & "<br>" & "Great Lakes Columbian Blend: " &Request.Form("Great Lakes Columbian Blend")..........................
Page 1 of 1
form returns too much info
#2
Posted 25 August 2009 - 01:29 PM
Yes. Your javascript needs to check the quantity. If it is greater than zero, then add it to the string representing the message. That is called string concatenation.
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens
#5
Posted 13 October 2009 - 09:28 AM
groovicus, on Aug 26 2009, 04:06 PM, said:
Umm. no, but judging by the sophistication of the code you provided, creating it on your own should be pretty easy.
Would you be interested in taking a look at it and helping me fix it for a small fee? I can get you a login to review all the code and help me fix this thing before my client has a cow about it!
#6
Posted 13 October 2009 - 10:43 AM
I don't work for 'small' fees. 
glcb = Request.Form("Great Lakes Columbian Blend")
if glcb>0 Then
msg = "The amount of Great Lakes Columbian Blend is: "&glcb
else
msg = "There is no Great Lakes Blend ordered."
End If
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens
#7
Posted 13 October 2009 - 11:04 AM
#8
Posted 13 October 2009 - 11:25 AM
Something like that would retrieve the form data associated with a field called "Great Lakes Columbian Blend". If the value were greater than zero, it would concatenate that value onto a string, or it would just create a message that the value doesn't exist. Of course, it doesn't check for null values, or if the data is even a number.
You need to get each value from the form. If the value is valid and greater than zero, then add it to the order form. You do the same thing for each value.
You need to get each value from the form. If the value is valid and greater than zero, then add it to the order form. You do the same thing for each value.
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens
Share this topic:
Page 1 of 1

Help

Back to top









