Contact and quotes forms included with Allwebco templates use standard w3c compliant code for the form fields. You can remove fields you are not using, and add new fields to gather additional information.
Step 1: Add new field
In this example we will create a new field in the "contact.htm" to gather a client's website address. In the "contact.htm" copy 2 lines of code as shown below:
Paste it just below itself and give the field a new name.
Your Website<br>
<input type="text" name="website" size="30" class="shadeform"><br>
Step 2:
Once the new field is created, if you're using formmail.pl or cgi, we must add the new field name to our "sort" list. Find the start of the form where this hidden field is and add website to the list:
In the above example we have added "website" to our sort list. Form names are case sensitive. Use all lower case when adding "website" to the list.
Required Option:
You can optionally add your new field to the "required" list, if you are using formmail.pl or cgi, so the new field must be filed out for the form to be submitted. In most cases only input types "text" and "textarea" can be made a required field.
Example Field Code Types:
Below are examples of form field code you can use to gather info with your contact or quotes form. When adding new field code as shown below, be sure to edit the name (or names) and do step #2 above on this page to add the new fields to your "sort" list (if the PHP, .pl or .cgi form script you're using requires a sort list).
<text> field: For a single line of typed text.
<text> field HTML: Code for the above field:
<textarea> field: For comments or questions.
<textarea> HTML code: Code for the above field:
<select> dropdown field: For selecting an option.
<select> HTML code: Code for the above field:
<radio> field: For selecting an option.
Note: Edit all radio buttons in a group with the same name!
<radio> HTML code: Code for the above field:
<checkbox> field: For selecting an option.
Note: Edit checkbox buttons in a group with all different names.