Aside from the comments posted on a blog, contact form serves as a channel of communication between visitors and administrators of the site. It is necessary for websites to have a well-built and fully functional contact form for their customers to reach them. Nevertheless, how do you actually implement contact forms into a WordPress website?
One quick way to do this is to use a plugin to add a contact form and implement it into a page via a shortcode. A cool free plugin that has all these functionality to cover most projects is Contact Form 7. With over a thousand five star rating in the WordPress Codex, this highly rated plugin can help you build, manage and customize your contact forms in no time.
Contact Form 7 is a simple yet flexible plugin to manage multiple contact forms. You can customize what data to collect from users from the forms using simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering, Google analytics form submission tracking, user access restriction and customized form layouts. The plugin can be enhanced by installing additional plugins recommended by the author:
- Flamingo – Lets you save submitted messages via contact forms in the database.
- Really Simple CAPTCHA – Really Simple CAPTCHA is a simple CAPTCHA module which works well with Contact Form 7.
- Bogo – multilingual plugin for Contact Form 7.
The plugin is available at the WordPress Codex plugin directory. You can also search it using the search function of the WordPress Plugin manager and install it from there. Once installed you can access the settings of the plugin under the new menu item added in the WordPress dashboard. There is a default contact form made upon accessing the plugin menu. You can choose to make your own or edit the existing form.
Contact Form works on shortcodes. The finished forms can be put into any post or page by implementing the corresponding shortcodes. This is how you get the shortcode to be inserted into you contact page.
Building the contact form involves generating a tag and pasting it on the left side of the form builder. The plugin includes a pre-made form that you can edit it to suit your needs. Advanced users can also add their own HTML codes to customize the look of the form. The CAPTCHA tag only works when another 3rd party plugin called “Really Simple CAPTCHA” is installed. A complete tutorial of the tags generated can be found here.
You can edit mail templates in the ‘Mail’ field set, similar tot he form template. You can use tags there as well, but note that tags for mail are different from those tags for forms. Tags you can use in a mail template contain only one word in brackets and look like [your-name]. You should be aware that this ‘your-name’ is the same as the name of the form tag which is noted in the previous example. The two tags correspond with the same name. In mail, [your-name] will be replaced by the user’s input value, which is submitted through the corresponding form field, which, in this case, is [text* your-name].
Error and confirmation messages can be set on the “Messages” template. Contact Form 7 included default messages template but you can edit it to your preference.
I tested Contact Form 7 and tried to publish my own contact page using the shortcodes generated by the plugin. The defauilt form, mail and messages template actually works well. You just need to edit the mail-to fields to have the messages sent to your preferred email.
Upon checking the page one see the form:
Sample finished form.
Contact Form 7 is a great plugin to add contact forms to your website. It is a free plugin with a premium set of features. The features are great for beginners and the level of customization is enough for advanced users who loves to mess up with code. You can see the full details of this plugin here.