Active Server Pages Programming (ASP)/ASP CDOSYS FORM
Expert: Srini Nagarajan - 3/6/2008
QuestionMy question is quite complicated & I don't know if I will explain it correctly - so I apologize up front.
I have a very long form that I am using check boxes on. The form sends an email fine using CDOSYS, but I don't what ALL the check boxes to be submitted. I want only those that are checked to send a value of ordered, the ones that are not checked send no value but show up in my email.
I don't know how to configure this to send only those that are checked. Also, I need some to be checked and then have a quantity entered into a text box to be sent together. I am VERY new to this all - I JUST learned HTML and should be having some kind of assistance!
Answerhi
Sorry for the delay in reply.
You can validate whether check box is checked before adding to email body.
What you can do is create a local variable and add all the body content onto it. then send that as email body.
example
BodyText= ""
BodyText = BodyText & "Name: " & request.form("name") & "<BR>"
BodyText = BodyText & "Add: " & request.form("add") & <br>"
etc.....
If Request.Form("CheckBox1") = "on" Then
BodyText = BodyText & "checked.. some content" & "<BR>"
Else
BodyText = BodyText & "not checked.. some content" & "<BR>"
End If
bodytext will be the body content.
_Srini