Wufoo's online form builder helps you create custom HTML forms without writing code. Use our online form creator to build contact forms, surveys, event registrations, and more. If you need online forms for generating leads, distributing surveys, collecting payments and more, JotForm is for you. Learn more about how we can help at JotForm.com.
In this guide we'll show you how to create a simple HTML contact form using easy to understand code.
Our form creator allows you to brand calculator forms, email forms, quiz forms, and other WP forms to match your site. Change colors, borders, font sizes, and more without any code. Flexible form layout design. Forms Use our drag & drop form builder to easily create your own online form or survey. Use our drag & drop form builder to easily create your own online form or survey. Choose from over 100 customizable templates and 40 question types to create registrations, customer surveys, order forms, lead forms and more. 123 Form Builder integrates with more of the tools you use than any other online form solution. That means your data goes where you need it without having to download endless CSVs and manually enter data.
One of the most useful pages of any website is the HTML contact form page. No website should be without a contact form.
Scroll down a little to see our form created using HTML for the front-end. Further down you will see the PHP code for the form processing at the back-end - this is used to take the form submissions and send it to you by email.
Index of this page:
The form shown below is a 'bare-bone' version only, however, if you want to look at a fuller version, please download our free contact form
Already have a form and need some help?
We offer installation, upgrades, fixes, and customisations. Get in touch to see how we can help.Form created using HTML
You can copy and paste this directly into your HTML page, or use it as a basis for your contact us page.
The CSS styles to use with the HTML form above
File Name: contact-form.css (you must save using this name exactly)The PHP Code which captures and Emails your website form
The PHP code below is very basic - it will capture the form fields specified in the HTML form above (Name, Email, and Message). The fields are then sent off to your email address in plain text.
Note: You need to edit 2 parts of the script below. You need to set your email address (this will not be available for anyone to see, it is only used by the server to send your email). You can also specify an email subject line (or just leave the one which is there).
File Name: contact-form-process.php (you must use this filename exactly)Save the files above. Once you edit the form to fit with your design, you are ready to try it out.
How the HTML form will look
Download free contact form using the link below. This version contains many more advanced features.
Download Free Contact FormHTML form field examples
To add new fields to your form, just copy and paste the field type you need from the examples below.
We have included a breakdown of different HTML Form tags.
HTML Form Tags
HTML website forms should be enclosed inside the FORM tags. There are various parameter options available, the most common ones are:
action - this allows you to tell the form where to go once submitted (usually the filename of a script which will read and process the form data which has been submitted).
name - it's usually a good idea to give your forms a name, this is used to uniquely identify your form on a given page.
method - the value of this should be POST or GET. Forms should usually be set to use POST (as GET will attach the form data onto the page URL which is almost always a bad idea for security reasons). There are some other methods available, but we will not discuss these here.
HTML Text Field - Single Line
This is without doubt the most common field you will find.
Text field in action
HTML Textarea (multiple lines text field )
The multi-line text field (commonly known as a textarea field) is more suitable to takes a larger block of text from your visitors. This is ideal for messages.
HTML Radio Buttons
When you want your users to pick one item from a short-list, the radio button set is ideal.
Radio button group in action
HTML Check box fields (checkboxes)
When you want your visitors to pick one or more items from a short-list, then checkboxes are ideal.
Checkboxes in action
HTML File Upload Field (field selector)
Sometimes it may be good to offer your website users the option to upload a file. For this, you could use the HTML field type file. If you are using this option you also need to include an additional option to the FORM tag enctype='multipart/form-data'
HTML Password Field
If you ever need to ask your users to enter a password into a form, then you should use the special text field type password. Using this option will mask each character as the user types, allowing them to type in secret.
Password field in action
HTML drop-downs (also sometimes known as 'selects' or 'combo-boxes')
When you want your visitors to pick something from a list, you could use a drop-down list. These are sometimes known as option selects, select fields, or combo-boxes. By default only one option can be selected, however, you can allow multiple selections by including the word multiple to your select tag (this will also alter the appearance of the field).
HTML Drop-down select field in action
Select Something:
HTML Submit button
Finally, every form should allow the user the option of submitting the form data. Form submissions are usually handled by using an HTML button. The button field is an input type field (as text and password fields are), however, these special fields are of type submit. To specify the text which appears on the button, we use the value parameter to state our value (in the example below we state 'Send Form').
HTML Reset button
Occasionally you may want to allow your visitors to reset a form back to its default state. This is accomplished by using the input type of reset. As with the Submit button, you specify the button text using the value parameter. Reset buttons are not very common these days but can still be useful under certain circumstances.
Reset button field in action
In this guide we'll show you how to create a simple HTML contact form using easy to understand code.
One of the most useful pages of any website is the HTML contact form page. No website should be without a contact form.
Scroll down a little to see our form created using HTML for the front-end. Further down you will see the PHP code for the form processing at the back-end - this is used to take the form submissions and send it to you by email.
Index of this page:
The form shown below is a 'bare-bone' version only, however, if you want to look at a fuller version, please download our free contact form
Already have a form and need some help?
We offer installation, upgrades, fixes, and customisations. Get in touch to see how we can help.Form created using HTML
You can copy and paste this directly into your HTML page, or use it as a basis for your contact us page.
The CSS styles to use with the HTML form above
File Name: contact-form.css (you must save using this name exactly)The PHP Code which captures and Emails your website form
The PHP code below is very basic - it will capture the form fields specified in the HTML form above (Name, Email, and Message). The fields are then sent off to your email address in plain text.
Note: You need to edit 2 parts of the script below. You need to set your email address (this will not be available for anyone to see, it is only used by the server to send your email). You can also specify an email subject line (or just leave the one which is there).
File Name: contact-form-process.php (you must use this filename exactly)Save the files above. Once you edit the form to fit with your design, you are ready to try it out.
How the HTML form will look
Form Buildercreate Contact Forms Or Any Other Former
Download free contact form using the link below. This version contains many more advanced features.
Download Free Contact FormHTML form field examples
To add new fields to your form, just copy and paste the field type you need from the examples below.
We have included a breakdown of different HTML Form tags.
HTML Form Tags
HTML website forms should be enclosed inside the FORM tags. There are various parameter options available, the most common ones are:
action - this allows you to tell the form where to go once submitted (usually the filename of a script which will read and process the form data which has been submitted).
name - it's usually a good idea to give your forms a name, this is used to uniquely identify your form on a given page.
method - the value of this should be POST or GET. Forms should usually be set to use POST (as GET will attach the form data onto the page URL which is almost always a bad idea for security reasons). There are some other methods available, but we will not discuss these here.
HTML Text Field - Single Line
This is without doubt the most common field you will find.
Text field in action
HTML Textarea (multiple lines text field )
The multi-line text field (commonly known as a textarea field) is more suitable to takes a larger block of text from your visitors. This is ideal for messages.
HTML Radio Buttons
Form Buildercreate Contact Forms Or Any Other Forms
When you want your users to pick one item from a short-list, the radio button set is ideal.
Radio button group in action
HTML Check box fields (checkboxes)
When you want your visitors to pick one or more items from a short-list, then checkboxes are ideal.
Checkboxes in action
Form Buildercreate Contact Forms Or Any Other Formatting
HTML File Upload Field (field selector)
Form Buildercreate Contact Forms Or Any Other Formal
Sometimes it may be good to offer your website users the option to upload a file. For this, you could use the HTML field type file. If you are using this option you also need to include an additional option to the FORM tag enctype='multipart/form-data'
HTML Password Field
If you ever need to ask your users to enter a password into a form, then you should use the special text field type password. Using this option will mask each character as the user types, allowing them to type in secret.
Password field in action
HTML drop-downs (also sometimes known as 'selects' or 'combo-boxes')
When you want your visitors to pick something from a list, you could use a drop-down list. These are sometimes known as option selects, select fields, or combo-boxes. By default only one option can be selected, however, you can allow multiple selections by including the word multiple to your select tag (this will also alter the appearance of the field).
HTML Drop-down select field in action
Select Something:
HTML Submit button
Finally, every form should allow the user the option of submitting the form data. Form submissions are usually handled by using an HTML button. The button field is an input type field (as text and password fields are), however, these special fields are of type submit. To specify the text which appears on the button, we use the value parameter to state our value (in the example below we state 'Send Form').
HTML Reset button
Occasionally you may want to allow your visitors to reset a form back to its default state. This is accomplished by using the input type of reset. As with the Submit button, you specify the button text using the value parameter. Reset buttons are not very common these days but can still be useful under certain circumstances.