The simplest method to get the form submissions posted to you via email is by using "mailto:" in the action field of the form. However, this method has many drawbacks.
First let us see how we can use 'mailto' in a form.
First let us see how we can use 'mailto' in a form.
How to set up 'mailto' in your HTML form
In the action field of the form, set the action as "mailto:<youremailaddress>" for example:
The sad part is that the behavior of such a form will be different in different browsers.
When this form is submitted, you will get the email in readable form. Like this:
< form action = "mailto:myforms@mydomain.com" > |
How to get the form data in plain text
We can make the form data sent to be in readable form by making a small change in the form.
Add 'enctype=text/plain' in the form attributes. The form code becomes:
< form action = "mailto:myforms@mydomain.com" enctype = "text/plain" > |
When this form is submitted, you will get the email in readable form. Like this:
Name=john |
Email=john@yahoo.com |
Address= |
Submit=Submit
How to show a 'Thank You' page You have successfully submitted the form. Now you want to show a confirmation page to the visitor that the form is submitted. Here is how to do it:
Suppose the name of the confirmation page is thanks.html Update the code for the form tag to:
|
No comments:
Post a Comment