Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

E-mailing form results using CDONTS

Status
Not open for further replies.

Master421

Programmer
May 6, 2002
1
US
I'm writing an ASP script to email form results to my email address. I've figured out how to pass text field results but I can't figure out how to pass check box or radio button results.
 
Hi,

For checkboxes, if your form code is:
<input type=&quot;checkbox&quot; name=&quot;check1&quot; value=&quot;value1&quot;>
<input type=&quot;checkbox&quot; name=&quot;check1&quot; value=&quot;value2&quot;>

the form processing code:

str1 = Request.Form(&quot;check1&quot;)
'str1 will be &quot;value1, value2&quot; if you check both checkboxes.

Radio options the code will be:
<input type=&quot;radio&quot; name=&quot;radio1&quot; value=&quot;value1&quot;>

Processing is the same for checkboxes. Then you can just pass str1 into the email body.

Is this what you were looking for? Hope this helps...

Multiplex
 
If you do not use the value property of a checkbox like so:
<input type=checkbox name=check id=check>
the value of this box if it is checked will be
&quot;on&quot;
in asp it will look like this:
if response.write request(&quot;check&quot;) = &quot;on&quot; then
' the box is checked


I would suggest to use the value property with radio buttons.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top