Dogbark.com >> How To
>> Programming >> Email Forms
A couple simple email options for gathering information that can be sent directly to you via email. If this looks like Greek to you then we'd be happy to help. See our rates for form creation.
• Email "mailto" Code.
A link on your site that someone can click on to send you an email is pretty standard. But you may want to specify what the particular link to email is for. With the following piece of code you can specify the subect of the email and even the body of the message if you like. Give it a try.
<a href="mailto:you@yourdomain.com?subject=what the subject line says&body=the message area of your email goes here if you want." >link verbage here</a>
• Web Email Form- Basic Form.
There might be instances when you want to gather specific information and an email is just not the way to go. This code allows you to build a form and receive it via email. This is the same form we use for our order forms.
<form method="post" action="/cgi-bin/dbbasicform.pl">
<input type="hidden" name="hidMAIL_FROM" value="from field of email">
<input type="hidden" name="hidMAIL_TO" value="yourname@yourdomain.com">
<input type="hidden" name="hidSUBJECT" value="subject of email">
<input type="hidden" name="hidURL" value="/whatever.html ">
<input type="hidden" name="hidORDER" value="here,put,name,of,fields,from,your,form,in,order">
• Web Email Form- Advanced Form.
This form has a "required" feature that asks the person submitting the information to fill in required fields before the form is submtted. Note: All links to files and images must contain the complete URL including the "http:" and domain name
<form action="/cgi-bin/dbadvform.pl"method="post" name="">
<input type="hidden" name="FORMNAME" value="info in subject line of email ">
<input type="hidden" name="THANKYOU" value="/whatever.html ">
<input type="hidden" name="EMAILFROM" value="you@yourdomain.com">
Options:
- Required Field: To make a field required, prefix the variable name with an "*".
(Example: <input type="text" name="*address" value="">
- Error Message: <!-- ERROR //--> Put this TAG somewhere inyour page to tell formeasy where to insert ERROR text).
- Email From: To make an email field the return (reply-to) email address, suffix a "*"
at the END of the file name.
(Example: <input type="text" name="email*" value="">.
- If you do this you will need to delete the above EMAILFROM input type).