- 1). Launch your text editor software and create a new page, or open an existing file.
- 2). Place your cursor in the area where you want your form to appear. Type in the opening and closing "<form></form>" code that creates an HTML form.
- 3). Enter "method=" and assign this to "post" in the opening form tag. Type "action=" and follow this with "mailto:" plus your email address. To illustrate:
<form method="post" action="mailto:you@address.com">
This code enables you to receive the order form results, once they are submitted. - 4). Type a form label, such as "Last Name," to ask the customer for the data that you need.
- 5). Enter "<input>" after the form label then enter "type=text" in this tag to build a text field that allows a user to enter his information. Additionally, type "name" and follow this with a word that identifies the data so you know what it relates to you when you receive the order form. Finish by entering a "value," such as "Enter your last name," to give your buyers a visual prompt inside the text field when they fill out the form. For example:
Last name <input type="text" name="last_name" value="Enter your last name" /> - 6). Repeat Steps 4 and 5, but this time assign the "type" to "checkbox" and choose associated "name" and "value" terms. For instance:
Notify me if this product is out of stock <input type="checkbox" name="stock" value="Stock" />
Create as many checkboxes as you need so the user can check the box next to the desired option. - 7). Type beginning and ending "<text></textarea>" tags to build a large text box for the customer to enter more information such as instructions. Enter a number value for "rows" and "cols" (columns) in the first tag to create the preferred size. To illustrate:
Enter any further instructions for this order <textarea name="instructions" cols="25" rows="3"></textarea> - 8). Enter the following code to create "Submit" and "Reset" buttons:
<input type="Submit" value="Submit" />
<input type="Reset" value="Reset" />
The "Submit" button send the order to you via email and the "Reset" button allows the buyer to start over.
SHARE