Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2005
    Posts
    87
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Send and receive form data through email

    The purpose of these scripts are to allow you to send forms using javascript. If your server doesn't support scripting languages like php or perl, or if you are unfamiliar with those languages, then this is an easy alternative for you.

    When you send a form using the mailto: command, the data gets sent using the post method and in the process gets reformatted. When you receive the form data in your email it will contain hexadecimal characters, spaces will be replaced with + signs, and each value will be separated by an & sign.

    You have two options when sending a form with javascript. Either you can reformat the data before it's sent. Thereby creating an email that is legible upon receiving it. Or you can reformat the data after you receive the email. I have posted both methods on this page.

    Option 1: REFORMAT AFTER

    Create your form using the following syntax:
    Code:
    <form name="NameOfYourForm" method="post" action="mailto:yourname@yourdomain.com">
    <!-- your input tags go here -->
    <input type="submit" value="Send">
    </form>
    Then download the attachment to this post. Open the file in your web browser. When you receive the email containing the form data, just select it all and copy it. Then paste the data into the "hexadecimal value" box. Click decode to convert it to ascii. Then click split to remove +'s and to split data onto multiple lines. Use the "add html" checkbox to make the output viewable in your web browser.

    NOTE:
    The first input tag that you use in your form will become the <title> if you use the html option. So if your first input tag is name="Name" value="Joe Smith" then the html title will appear as <title>Name: Joe Smith</title>.
    Attached Files Attached Files
    Last edited by pccode; 10-13-2005 at 06:43 AM.

  • #2
    New Coder
    Join Date
    Oct 2005
    Posts
    87
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Option 2: REFORMAT BEFORE

    Download the attachment in this post and open it in notepad. Edit the html file where you are prompted. You will then have the option of sending plain text emails or html emails. By using this script your form data will not need reformatting upon arrival.
    Attached Files Attached Files

  • #3
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanx alot man..

    just wat i need..

  • #4
    Regular Coder
    Join Date
    Sep 2005
    Posts
    146
    Thanks
    0
    Thanked 0 Times in 0 Posts
    awesome! I'll definately be using this script. cheers buddy


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •