Free HTML Contact Form Code

123ContactForm helps you get the HTML contact form code you need to insert into your contact page.
You just need to sign up for free and start using our html contact form generator.

Creating fully functional HTML contact form code
with PHP script processing

After you sign up, create the form you need by using the form builder. The HTML code is automatically generated so that you may insert it into your contact page or any other web page.

HTML contact forms are one of the most common components in most websites or blogs. They are becoming highly popular on the rest of the web as well, for example on Facebook pages and in email newsletters. We are going to take a look at how to generate our own HTML contact form code. It is a nice and simple HTML contact form. To make it work properly, we will add a PHP script to the HTML contact form code.

The HTML contact form script

						<form id="contact_form" action="#" method="POST" enctype="multipart/form-data">
	<div class="row">
		<label for="name">Your name:</label><br />
		<input id="name" class="input" name="name" type="text" value="" size="30" /><br />
	<div class="row">
		<label for="email">Your email:</label><br />
		<input id="email" class="input" name="email" type="text" value="" size="30" /><br />
	<div class="row">
		<label for="message">Your message:</label><br />
		<textarea id="message" class="input" name="message" rows="7" cols="30"></textarea><br />
	<input id="submit_button" type="submit" value="Send email" />

Step 1 Create the file with the HTML code of the contact form

Firstly, we will create the HTML form which will display basic form fields. It will ask users to submit their Name, Email Address and a Message.

Step 2 Add PHP functions to our contact form HTML code

Now that we have the HTML contact form code ready, we will just have to add the PHP script that will process it. Basically, the PHP script verifies if all of the fields of the HTML contact form were filled out correctly and displays an error message next to the input field if needed. Then it processes the data and sends it to your email.

Creating the PHP script requires basic understanding of PHP coding. You can still use our free HTML contact form code generator, that works like magic without any technical knowledge.

Check the image on the left to see how your form will look in the browser if you save the above HTML contact form code. To download the full code of the HTML contact form with the PHP script, click here.

Get more features by using our drag & drop HTML
contact form code generator

That's it, we generated fully functional and simple HTML contact form code. You can build more advanced HTML contact forms with our free HTML contact form code generator. Among the features, you've got:

All of these features and many others can be implemented with our simple HTML contact form code generator. Don't hesitate to try it out!

Create a Free Account

By signing up, you're agreeing with the 123ContactForm Terms of Service