0

My idea is that i let user fill in text-boxes, and then i want him to press send button, and that text would be sent to my e-mail. But every time, when i press the send button, opens a new, blank chrome page, no matter from which browser i work... Here is the part of the code, that operates with it. Hope u cann help to solve my issue.

<form action="MAILTO:example@domain.lv" method="post" enctype="text/plain">
                <table>
                  <tr>
                    <td><span class="tekstaievadei">Name:</span></td>
                    <td><input id="vards" type="text" name="name"></td>
                  </tr>
                  <tr>
                    <td><span class="tekstaievadei">Surname:</span></td>
                    <td><input type="text" name="surname" id="surname"></td>
                  </tr>
                  <tr>
                    <td><span class="tekstaievadei">Nr:</span></td>
                    <td><input type="text" name="nr" id="nr"></td>
                  </tr>
                </table>
                <input type="submit" value="Submit">
             </form>
Oskars
  • 407
  • 4
  • 24
  • To my knowledge, you will need some server-side code (ex: PHP) to get that mail sent. What your code does is typical of browsers and was meant to be that way. In short, it will not do what you want done. – TribalChief Jul 08 '14 at 11:43
  • See this question please. http://stackoverflow.com/questions/8239782/how-to-create-an-email-form-that-can-send-email-using-html – Ace Jul 08 '14 at 11:43

1 Answers1

1

You cannot pre-populate an email with the values of form fields. Using mailto simply opens a new email to the given email address. Send the email from the server side if you want full control.

woz
  • 10,888
  • 3
  • 34
  • 64