There are many plugins you can use to add a contact form to your WordPress blog. We like the functionality of the Contact Form 7 plugin and use it on many of our sites.
Before using Contact Form 7, we need to install the plugin to the blog. If you aren’t familiar with the process, from your WordPress admin panel, click on Plugins > Add New. Type “Contact Form 7” in the search box and click the “Search Plugins” button. Contact Form 7 by Takayuki Miyoshi should be the first result. Click the “Install Now” link and then “Activate Plugin.”
Once the plugin is installed, there is a new “Contact” menu option on your WordPress Admin panel.
By default, there is already a contact form ready for you to use. The pre-made form includes a place for name, email, subject, and message. Here’s a shot of the code in the pre-made form and what the resulting form would look like.
Each item in the form passes its content to the the mail generation form. You can see below where each field from the form above (ex: your-name and your-subject) is entered into the mail template. If you do not include the variables in your mail template, you won’t receive the information the person enters in your emails.
If you want to modify the form, you can do by deleting items from the form or by adding new elements using the “Generate Tag” dropdown menu. For example, we strongly recommend including a CAPTCHA field on all forms. This helps prevent spammers from being able to bombard your email box with spam via your contact form.
To add a CAPTCHA field, the Really Simple CAPTCHA plugin must be installed. You can you the same installation steps we mentioned above to install it. Next, we’ll select CAPTCHA from the “Generate Tag” drop down. A window will appear with several CAPTCHA options. Most of these options are optional and are settings for the CAPTCHA image and your input fields; you can leave these blank. The code that we’re interested is the short code highlighted in brown.
To add the CAPTCHA field to our form, we need to copy the short code highlighted into our form. To keep our formatting consistent, we’ll wrap our code with <p> tags. Hit the “Save” button at the top of your form, and this is what you should have:
If you want to have multiple contact forms on your site, you can create a new contact form by clicking the “Add new” button. After you select your language, you will have a new basic form that you can modify.
To install your contact form onto the page, simply copy and paste the provided short code (you’ll see it underneath the title of the form) onto the post or page you would like the form to be displayed.