Active Server Pages Programming (ASP)/ASP CDOSYS FORM

Advertisement


Question
My 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!

Answer
hi

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

Active Server Pages Programming (ASP)

All Answers


Answers by Expert:


Ask Experts

Volunteer


Srini Nagarajan

Expertise

I can answer any kind of questions in ASP.NET, C#, VB.NET, SharePoint 2007, ASP, Coldfusion, Powerbuilder 7.00 / 8.00, JAVA servlets, MS SQL 2000 / MSSQL7, Sybase

Experience

Contact me if you need any custom development on ASP.NET, ASP, SharePoint 2007, Coldfusion, Powerbuilder.

©2012 About.com, a part of The New York Times Company. All rights reserved.