Form E-Mail
 A basic script that converts the contents of a form to an e-mail message
-
Getting started
-
How to create an input field
-
Customizing the default subjecting line
-
Including a form field into the e-mail subject
-
Making a field required
-
Customizing the page seen after form completion
-
Changing the order of your form results
-
Adding a blind carbon copy (bcc) e-mail address
-
Specifying a return e-mail address
Create an HTML form with the following tags:
- A standard <form> tag that contains the path to the Form->Email processing script
<form method= "post" action="http://www.bizland.com/scripts/formemail.bml">
- A hidden tag. This tag means it cannot be seen by your customers and tells the form where to e-mail the contents of the form.
<input type="hidden" name="my_email" value="youremail">
Create an input field for each piece of data you wish to collect
To create an input field you can use a tag such as this:
<input type="text" name="fieldname" size="25">
For example if you wanted to create a input field called fullname it would look like this:
<input type="text" name="fullname" size="25">
You can customize the default subject line by using this hidden tag and replacing subject with what you want the subject to be
<input type="hidden" name="subject" value="subject">
If you want to include one of the input fields in the return e-mail's subject field, all you need to do is replace "Subject" in your code with the NAME of the field surrounded by %%.
For example, if your form contains a field named firstname, it would look like this
<input type="hidden" name="subject" value="form submission from %%firstname%%">
If you want to make a certain input field required in your form. Use the following tag
<input type="hidden" name="required" value="field1,fieldn">
For example, if you were making the field named emailadress and firstname, your tag would look like this
Note: "required" must be in lower-case letters to be recognized by our processor; name="REQUIRED" may not work.
<input type="hidden" name="required" value="emailaddress, firstname">
You can send your visitors to various URLs after they have completed the form.
- To send them to a specific page after they have completed the form successfully by using the tag below and replacing "yoururl" with the page name. The URL does not have to be on your site or even hosted with BizLand. It is best to use full path names (http://www.yoursite.com/page.html) and not local paths (/page/html).
<input type="hidden" name="thankyou_url" value="yoururl">
- If a customer fills out your form incorrectly, you can customize the "error" page by they see inserting the following line of code in your form:
<input type="hidden" name="error_url" value="yoururl">
By default, the results of your form are displayed alphabetically by field name
- To change this order,you will need to use the following syntax.
<input type="hidden" name="order" value="field,field2,field3">
You can have an e-mail address as an blind carbon copy to the results of your form.
- Use the following syntax to add a bcc e-mail address:
<input type ="hidden" name ="bcc" value="bbcemailaddress">
Have your customers insert their e-mail address into your form.
- Use the following syntax to have your customers add their e-mail address:
<input type="text" name="email">
|