PHP contact form

Create a contact form that allows site visitors to email you without the need to use their email client. This generator will create a PHP contact form which is placed on your contact page and will display a form which site visitors fill out. When the submit button is clicked, form validation is performed using javascript. When the form submits, the visitor is presented with a 'thank you' message of your choice, and an email is sent to the stipulated address.

Code is included within the form to help prevent email header injection, preventing spammers from using your form to send mass emails.

This is a simple form, aimed at putting a basic contact form on your site. If you are proficient with HTML and PHP, you can use this form as a basis, saving you coding from scratch - and customise the form as required.

Form item instructions:
  1. Select type of field and click 'Add this item to my form'
  2. Each item must have a field name, ie: email. This doesn't get displayed, it's an 'identifier'. If not provided, a default name will be set.
  3. Enter values pertaining to the item selected
  4. When you have all of the fields you want, continue down to the email properties
    and fill in the necessary information
  5. Click generate, then copy and paste the generated code into your contact page.
Form items
 
Email details:
Text displayed on button:
Email address to receive the form submission:
Subject of email:
Thank-you message: