ASP form HELP!
- Started
- Last post
- 7 Responses
- oynk
i've got an asp form with textfields and checkbox.
when i click submit, the info gets set to my email.
the text shows up, but i don't see any checkbox info.
does anyone have any idea where i can find a script for this? i'm a newbie, so something simple.
thanks!
- oynk0
*bump*
anyone??
- tfs__mag0
umm are you capturing the checkbox values and putting them into variables on the section of the script that actually sends the mail?
[input type="checkbox" value="yourvalue" name="my_checkbox"]
can be captured as
[%
my_checkbox=request("my_checkbox...
%]the varialbe my_checkbox can then be added to the body of the email message.
ps: if you don't understand what i've just wrote... go look up some basic asp tutorials and get crackin
- oynk0
i've been reading some tutorials. slowly sinking in...thanks for your help, i will try it...
- mitsu0
a checked value returns "on"
an unchecked value returns ""
- oynk0
this is the code i've used. i've taken the code you've sent, modified it, but doesn't seems to work:
Mailer.BodyText= Request.Form("txtName") & " has submitted the following message:" & vbCrLf & vbCrLf & _
"Name: " & vbCrLf & _
Request.Form("txtName") & vbCrLf & vbCrLf & _
"Email: " & vbCrLf & _
Request.Form("txtEmail") & vbCrLf & vbCrLf & _
"Message: " & vbCrLf & _
Request.Form("txtMessage")
selection=request("checkbox")
- tfs__mag0
mitsu is correct, but i usually assign values to my check boxes... like value="yes" or value="no" rather than use the "" or "on".
on your code... is the name attribute of you checkbox set as name="checkbox" ? because the name attribute is what you need to call... so
[input type="checkbox" name="the_name" value="yes"]
you would need
[%
request("the_name")
%]
- oynk0
geez. i've done this, but doens't seem to work. i'm going to check some other tutorials, but i get the same type of script you sent, tfs.
thanks for your help.