andrico
Posts: 12
|
Posted: 01/13/2004, 9:37 AM |
|
I have an email component that works perfect for forms with 'text boxes'. But 'label' fields are not forwarded with the emailed form. A typical line of code in the 'email function' on my asp page is:
Mailer.BodyText = " Type of Service: " & Request.Form("type_of_service") & vbcrlf
This pulls any info in that particular text field. What would I have to change or add to pull any info in a 'Label' field? I know it is a simple answer, I'm just having a major brain fog day. Thanks in advance for your help.
Rico
_________________
Rico |
|
|
EMG
Posts: 35
|
Posted: 01/13/2004, 10:36 AM |
|
Labels are not input controls and therefore not passed in the form.
Here is a little trick I use to capture the entire form in one shot.
1. Add a hidden field in the form and name it "HtmlBody".
2. Modify the submit button so type="button" (not submit)
3. Add onClick="submit_form()" to the button
4. add javascript:
<script language="JavaScript" >
function submit_form(){
var frm = document.form1;
frm.HtmlBody.value = "";
frm.HtmlBody.value = document.body.innerHTML;
frm.submit();
}
5. Your entire HMTL form will available in Request.Form("HtmlBody")
Hope this helps
|
|
|
|