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.
For checkboxes, if your form code is:
<input type="checkbox" name="check1" value="value1">
<input type="checkbox" name="check1" value="value2">
the form processing code:
str1 = Request.Form("check1"
'str1 will be "value1, value2" if you check both checkboxes.
Radio options the code will be:
<input type="radio" name="radio1" value="value1">
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...
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
"on"
in asp it will look like this:
if response.write request("check" = "on" then
' the box is checked
I would suggest to use the value property with radio buttons.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.