Website Templates Adding Form Fields

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:

Step 1:
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:

</td></tr><tr><td>
<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.

</td></tr><tr><td>
<input type="text" name="website" size="30" class="shadeform"> Your Website<br>


Step 2:
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.

Required Option:
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!

No Selection
Windows Vista
Windows XP
Windows 2000
Other Windows
Macintosh


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.

Windows Vista
Windows XP
Windows 2000
Other Windows
Macintosh


Checkbox Code: Code for the above field:













See Also:
Setting up Formmail


Links:
Download FormMail
Alternate Formmail Script Support Page
Setting Up FormMail


Allwebco Template Support


Allwebco Website Template Support


Form Setup:
Overview
Basic Steps
Quick Steps
PHP Option
ASP Option
Troubleshooting
Adding Fields
Advanced Script
Alternate Scripts
GoDaddy Form
Other Options



Forms Included Templates
Contact and quotes form templates.
AllwebcoDesign.com
Web Site Templates
Free Javascripts
Free scripts for any website or template.
Allwebco-Templates
Web Template Support
Mobile Web Templates
Mobile configured HTML5 templates.
AllwebcoDesign.com
Web Site Templates
Shopping Cart Templates
Professional templates with built-in Paypal.
AllwebcoDesign.com



Website Template Support
Website Template Support