CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Emailing 'Label' fields...Helps!

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.