View Full Version : Emailing form data

08-10-2005, 09:03 AM
I need to email a summary form to the receipt but i couldnt capture the form data to Outlook's textfield. Can someone give me some pointers? I have tried using mailto at form header but to no avail..Or is there any other way to do this???

Johnny Lang
08-10-2005, 12:45 PM
<Script Language=JavaScript>

function sendMail(isForm){

isBody = "";
recipient = "me@someDomain.com";
isSubject = "Form Data";
isBody = "Name: " + isForm.personal.value +"%0D%0A";
isBody += "Address: " + isForm.address.value +"%0D%0A";
isBody += "City: " + isForm.city.value +"%0D%0A";
isBody += "State: " + isForm.state.value +"%0D%0A";
isBody += "Zip: " + isForm.zip.value;
document.forms.Send.action = "mailto:"+recipient+"?subject="+isSubject+"&body="+isBody+"&nbsp";

<Form name='Form1'>
Name <input name='personal' value="John Doe" size=25><br>
Address <input name='address' value="123 Main Street" size=30><br>
City <input name='city' value="Springfield" size=15> State <input name='state' value="OH" size=2><br>
Zip Code <input name='zip' value="12345" size=4><br>
<Form name='Send' action=''>
<input type="submit" value="Send by Email" onclick="sendMail(document.Form1)">

08-11-2005, 03:03 AM
Thanks a lot, ur a great help.


08-11-2005, 05:42 AM
isBody += "State: " + isForm.state.value +"%0D%0A";

does this kind of line usable for radio buttons???