Contact 7 form is one of my favorite plugins for WP – in fact – I use it on all the sites I run. Gravity forms is an awesome alternative, but since it is free, and runs on WP Multisite, I stick with contact form 7. The only problem: Contact Form 7 needs customization and style. This tutorial will teach you how to create a contact form that goes from (the default css):
To something a little more eye catching. This tutorial will add a bit of style and color to Contact Form 7. Feel free to change the colors in the process:
Let’s begin! First, you need to download the Contact Form 7 plugin.
Installing Contact Form 7
Installing the WordPress plugin could not be easier. Always make sure you have a recent backup of your database before you install or update anything on your site (I say this, but hardly every do it). After you backup you site, here’s how to install Contact Form 7.
- Log-in to Your WordPress website.
- Under “Plugins” click on “Add New”.
- Under ”Search” enter “Contact Form 7” .
- After the page reloads Click on “Install Now” under Contact Form 7.
- Click “OK” when you get the “Are You Sure” alert.
- After the plugin downloads click “Activate Plugin”.
- You’ll now have a “Contact” tab in the menu on the left side of the screen.
- Click the “Contact” tab.
We are going to be working with the default contact form. If you need to add fields, that is fine — just make sure they are in the same class.
Customizing the Contact Form 7 Plugin
Here’s the code to get it looking good.
There are a few things you need to keep in mind.
- You may need to adjust the width of the input and textarea. Every theme is different.
- Make sure you change the border color of the input, textarea, and .text to match your site.
The default HTML for Contact Form 7 is below:
We want to change that too: Below, are we are doing is removing the Titles. We removed “Your Name (required)”, “Your Email (required)”, “Subject”, and “Message”. It is okay to remove those. We are going to add text inside the input boxes. Contact Form 7 calls this “placeholder text” – but we will get to that shortly.
Now, if you are following along, your form should look something like this:
You will notice that all of the titles have been removed. We did this to streamline everything. When working with customers, the shorter the CTA (the form), the better. If there are unneeded breakspaces and text, remove them.
Next up: Add the placeholders. The placeholders are the text that go inside the input boxes. They are “suggestions”. If you are confused, just look down below and it will make more sense.
You will notice in this step all we did was add placeholder text. Placeholder text goes inside the input areas and give hints or suggestions. These placeholders replace the need for “Titles”.
At this point, we are ready to start styling the form. Don’t worry if your form doesn’t look just like mine (each theme has different default stylings)! We will get to that in the next step. The important part is that we have the structure down.
Just add the following: