Adding More Form Field Support
Adding Fields on the Contact and Quote Form
If you are adding some additional fields to a contact or quote form, here are some details on what you will need to do to make them work:
For this example we will create a new field on the contact.htm for gathering a client's website address. First we will copy the 2 lines of code shown below:
<input type="text" name="yourname" size="30" class="shadeform"> Name<br>
Now we will paste it just below itself. Now we must give the field a new name.
<input type="text" name="website" size="30" class="shadeform"> Your Website<br>
Once the new field is created, if you are using formmail.pl or cgi, we must add the new field name to our "sort" list. Find the start of the form where this field is:
<input type="hidden" name="sort" value="through,yourname,phone,email,comments,website">
You can see in the above example we have added "website" to our sort list. Keep in mind that this is case sensitive. Use all lower case or make the new field and "sort" list match exactly.
You can also add your new field to the "required" list, if you are using formmail.pl or cgi, so the field must be filed out for the form to be submitted. Only input types text and textarea can be required with most scripts.
<input type="hidden" name="required" value="email,your_name,website">
Sample Field Code Types:
Below are examples of code you can use to gather info with your contact or quotes form. If you add any code below to your contact or quotes form be sure to edit the name, or names, and do step #2 above on this page.
Text Sample: For a single line of typed text.
#1 Text Code: Code for the above field:
#2 Textarea Sample: For comments or questions.
Textarea Code: Code for the above field:
#3 Dropdown Sample: For selecting an option.
Dropdown Code: Code for the above field:
#4 Radio Sample: For selecting an option.
NOTE: Edit all radio buttons in a group with the same name!
Radio Code: Code for the above field:
#4 Checkbox Sample: For selecting an option.
NOTE: Edit checkbox buttons in a group with all different names.
Checkbox Code: Code for the above field:
Setting up Formmail
Alternate Formmail Script Support Page