Search code examples
htmlmailto

HTML submit text value with line breaks


I am making a quiz with checkbox'es and the answers get sent by e-mail. but when the answers get posted to the e-mail body there are no line breaks, \n, 
, &#10.... do not work, please advise

<form method=post action=mailto:[email protected]>
<ol>
Name:<thisUserName><p>
<li>
    How do you spell cat?<br>
    <input type ='checkbox' name = 'Q1' value ='A'>
    KAT<br>
    <input type ='checkbox' name = 'Q1' value ='B'>
    Kit-Kat<br>
    <input type ='checkbox' name = 'Q1' value ='C'>
    Cat<br>
<li>
    <IMG SRC=http://upload.wikimedia.org/wikipedia/commons/9/91/Schrodingers_cat.svg height="400" width="400">.   <br>
    According to Schrödinger is the cat alive or dead?<p>
    <input type ='checkbox' name = 'Q2' value ='A'>
    Dead<br>
    <input type ='checkbox' name = 'Q2' value ='B'>
    Alive<br>
    <input type ='checkbox' name = 'Q2' value ='C'>
    Both<br>
<li>
    What do you know about cats?<p>
Answer:<input type=textarea name=Answer3 rows="5" cols="20" wrap="physical"  ><br>
<center><input type='submit' value='Submit answers by e-mail'  onClick='alert("Quiz answers are being sent by e-mail.")'></center></ol>
</form>

the e-mail body looks like Q1=A&Q2=A&Answer3=meow and I want it to look like

Q1=A
Q2=A
Answer3=meow 

Solution

  • this solution worked

    <form method="post"  enctype="text/plain" action="mailto:[email protected]?subject=my%20test%20form">
    <ol>
    Name:<thisUserName><p>
    <li>
        How do you spell cat?<br>
        <input type ='checkbox' name = 'Q1' value ='A'>
        KAT<br>
        <input type ='checkbox' name = 'Q1' value ='B'>
        Kit-Kat<br>
        <input type ='checkbox' name = 'Q1' value ='C'>
        Cat<br>
    <li>
        <IMG SRC=http://upload.wikimedia.org/wikipedia/commons/9/91/Schrodingers_cat.svg height="400" width="400">.   <br>
        According to Schrödinger is the cat alive or dead?<p>
        <input type ='checkbox' name = 'Q2' value ='A'>
        Dead<br>
        <input type ='checkbox' name = 'Q2' value ='B'>
        Alive<br>
        <input type ='checkbox' name = 'Q2' value ='C'>
        Both<br>
    <li>
        What do you know about cats?<p>
    Answer:<input type=textarea name=Answer3 rows="5" cols="20" wrap="physical"  ><br>
    <center><input type='submit' value='Submit answers by e-mail'  onClick='alert("Quiz answers are being sent by e-mail.")'></center></ol>
    </form>