This post is no longer updated. Move to Contact Form 7 official site.
Download | Plugin Homepage | FAQ | Support Forum
Summary
![]()
Just another contact form plugin. Simple but flexible.
- Supports multiple contact forms.
- You can customize form and mail contents with simple markup.
- AJAX submitting with jQuery Form Plugin.
- Spam filtering with Akismet.
- Bot prevention with CAPTCHA.
Download and Install
Download the latest release from WordPress.org plugin directory.
- Upload whole contact-form-7 folder to the /wp-content/plugins/ directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
Usage
- Open admin page
[Options] – [Contact Form 7][Manage] – [Contact Form 7].Update: If you are using WordPress 2.7 or greater, you can find the admin page under [Tools] – [Contact Form 7].
- Edit default “Contact form 1” or add new and save it.
- Copy
[contact-form ...]code and paste it into the content of any posts you need the contact form.
FAQ
How to customize form and mail contents
You can use “tags” in several fields. Contact Form 7’s “tag” is formed string enclosed in square brackets [].
A tag used in form content is replaced by HTML form control element like <input> or <textarea>.
A tag used in mail template is replaced by user input of element with the same name.

In this picture, a tag [textarea your-message ...] inserted in form content is replaced by <textarea> tag with name="your-message" attribute.
When a visitor input into this <textarea> field and submit, Contact Form 7 generates a mail based on mail template. Since message body field has [your-message] tag, this tag replaced by the user input message.
Tags in form content
You can use the following types of tags in form content.
| Type | Replaced by | Validated as |
|---|---|---|
| text | <input type="text" /> |
Any text |
| text* | <input type="text" /> |
Any text / Required |
<input type="text" /> |
Email address | |
| email* | <input type="text" /> |
Email address / Required |
| textarea | <textarea> </textarea> |
Any text |
| textarea* | <textarea> </textarea> |
Any text / Required |
| select | <select> </select> |
— |
<select> </select> |
— | |
| checkbox | <input type="checkbox" /> ... |
— |
<input type="checkbox" /> ... |
— | |
| radio | <input type="radio" /> ... |
— |
| captchac | <img /> |
CAPTCHA See How to use CAPTCHA |
| captchar | <input type="text" /> |
|
| submit | <input type="submit" /> |
— |

The syntax of tag is not so easy. You can use Generate Tag menu under Form textarea to make a tag you need.
I show you some examples of tags.
[text your-name 40/100 "John Smith"]This tag is replaced with:
<input type="text" name="your-name" size="40" maxlength="100" value="John Smith" />[email* your-email 60/ id:email]<input type="text" name="your-email" id="email" size="60" />[textarea your-message 80x15 "Write message here."]<textarea name="your-message" cols="80" rows="15">Write message here.</textarea>
[select your-country "China" "India" "other"]<select name="your-country"> <option value="China">China</option> <option value="India">India</option> <option value="other">other</option> </select>
I wrote about tag syntax.
How to use Akismet on Contact Form 7
1. You need Akismet plugin. If you have not activated it yet, activate it first.
2. Open Contact Form 7’s admin page and edit Form text area as:
- Add
akismet:authoroption to the tag of field which requires sender’s name.
Example:[text* your-name akismet:author] - Add
akismet:author_emailoption to the tag of field which requires sender’s email address.
Example:[email* your-email akismet:author_email] - Add
akismet:author_urloption to the tag of field which requires sender’s URL.
Example:[text your-url akismet:author_url]
Once you have activated the Akismet plugin and at least one of the akismet: options is set, Contact Form 7 will send all of a sender’s input as well as any other information related to input activity to the Akismet server. Akismet will then judge whether this input is likely to be spam.
When Akismet judges a message as spam, Contact Form 7 sends no mail and shows a response message with an orange border line (the third example in the picture below).

To make sure the spam filtering is working, send a message with “viagra-test-123” as the sender’s name. If the test is a success, the message will be judged as spam.
Changelog
- 0.9 (2007/04/30)
- Initial release.
- 1.0 (2007/05/20)
- Tag helper.
- 1.1 (2007/08/02)
- File restructuring.
- 1.2 (2007/08/16)
- jQuery Form Plugin introduced.
- 1.3 (2007/08/26)
-
New tag type:
[select] - 1.3.1 (2007/08/26)
- Critical bug about JavaScript loading fixed.
- 1.3.2 (2007/09/03)
- Bug fix around jQuery.
- 1.4 (2007/09/07)
- Akismet spam filtering introduced.
- 1.4.1 (2007/09/11)
- Add Spanish and Catalan translations.
- 1.4.2 (2007/09/13)
- Add German translation.
- 1.4.3 (2007/09/15)
- Add Polish translation.
- 1.4.4 (2007/09/17)
- Add French translation.
- 1.5 (2007/10/07)
- CAPTCHA introduced.
- 1.6 (2007/10/17)
- Mail (2) and UI improvement for admin page.
- 1.6.1 (2007/10/27)
- Sidebar widget support.
- 1.7 (2007/11/27)
-
New tag type:
[select+],[checkbox],[checkbox+]and[radio] - 1.7.1 (2007/12/06)
- Made wpcf7 variable global. Polish translation updated.
- 1.7.2 (2007/12/13)
- Bugfix. Czech translation added.
- 1.7.3 (2007/12/23)
- New
default:andlabel-firstoptions added. - 1.7.4 (2007/12/30)
select+andcheckbox+tag types removed.multipleandexclusiveoptions added.- 1.7.5 (2008/01/26)
- Two fixes and
include_blankoption. - 1.7.6 (2008/03/02)
- New
acceptancetag added.
1,401 replies on “Contact Form 7”
[…] Contact Form 7 […]
can be image upload
when I create a new contact form, how to I edit the title of that contact form – the default is “untitled” – where can I edit “untitled”?
yo2go,
Simply click on the “untitled”.
conflict with “All in One Adsense and YPN”
I am getting the following error, which just started showing up in the last day or two (I’ve copied the error from Firebug.)
jQuery(“div.wpcf7 > form”).ajaxForm is not a function
http://urbanjazz.ca/wp-content/plugins/contact-form-7/contact-form-7.js
Line 5
Hi,
I had problems with the email being sent and fixed it by adding the WP-MAIL-SMTP plugin. I setup my wordpress to send emails via SMTP.
Thanks for the lovely plugin! Love it.
Cheers.
Great plugin.
I’m missing an IP address field of the one submitting through the contact form though…
a very informative post here ;)
[…] Contact Form, […]
Miyoshi, please help if you can. The form I am using is on this page: http://ammochiefs.com/ammochiefs/?page_id=80
The problem I am having is that I can fill in the entire form and receive a confirmation the the form has been sent but the only field I receive in the email reply is the “your message” field.
Thanks,
Rich
richmc, you may find this FAQ stuff useful.
very usefull for newbies..
can this contact form use fields in the database from the logged in user?
I want the form to automatically put in the email address the user has in the profile, and ideally the login they are using as well.
thanks
[…] 1. Contact Form 7 […]
hello miyoshi,
thank you for the best contact form plugin ever… i’ve used the plugin on several sites, however i’m experiencing a problem now: jquery scripts will not be loaded, so there is no ajax effect. i don’t see the js codes in the source code.
can you please help me fix it?
thank you.
Oh, it was my fault! I’ve just fixed it adding in .
Thanks!
zb, unfortunately it does not support such ways.
I would like to add “padding” to my submit button to be similar to my other forms but without the possibility to add a class to “submit button”(input.submit) how can I do ?
gaelleruin, it’s not supported at this time. I’ll add such feature into next version 1.8. Please wait.
[…] Somewhere in there had to be a contact form for me and indeed, I found one. It’s called, Contact Form 7 written by Takayuki Miyoshi. Contact Form 7 comes with the following feature […]
[…] Contact Form 7 – simple and flexible contact form. […]
[…] Contact Form 7 […]
any way to implement it?
code is :
global $current_user;
$current_user->user_email;
taken from : http://comox.textdrive.com/pipermail/wp-hackers/2007-November/015944.html
thanks
please add support:
*Display user IP
*user agent
*referrer in the message.
Thanks.!
Lackfer, ok, they will be supported in next Contact Form 7 1.8.x. It will be released in two or three months, I suppose.
ok, thanks..!
exactly the form plugin i was searching for
thanks!!
[…] because you may be missing out on a lot of opportunities by not having an easy contact page. I use Contact Form 7, which is very easy to […]
Thanks for your reply Miyoshi. I tried as you suggested and a few variations but they still didn’t change the width of the text areas.
eg. [textarea* funny-story 40×6]
[textarea* about-store 200×6]
[textarea* best-memory 600×3]
I don’t know what I am doing wrong. The height changes without a problem but the width is very stubborn.
deadhippo, if there is CSS which defines width of textareas (e.g.
textarea {width: xxxx}), the CSS setting override Contact Form 7’s setting (colsattribute of<textarea>element). Check your stylesheet.[…] Contact Form 7 1.7.7 by Takayuki Miyoshi […]
Thanks Miyoshi. That was exactly it.
[…] Contact Form 7 : permet de créer des formulaires de contacts personnalisés. Je sais qu’il existe un autre plugins bien plus puissant et beaucoup plus recommandé mais justement je le trouve trop puissant et chiant à paramétrer alors que Contact Form 7 est facile à prendre en main. […]
Hi,
Can you please make this plug-in Valid XHTML 1.0 Strict ?
The input fields simply needed to be between a fieldset.
Tried myself but did not come out right. I made it valid but it was not ending the fieldset correctly.
Thanks,
Will
[…] the plugin I chose is called Contact Form 7 and it has some nice features. The main one is that it requires a captcha which is an image with […]
Will, ok, I’ll do that if possible.
[…] min av innstikket Contact form 7 versjon 1.7.7.1 er nå tilgjengelig. Last ned språkfil og legg den i mappen languages inne i […]
[…] Contact Form 7 1.7.6 […]
I am having the same problem that xONE had with contact form 7 and swift smtp. I have to stay with swift because it works with GMAIL. Any new developments on that problem:
“test email works from swift smtp, however I get a continuous circling of the arrows when form is submitted”
Jason, I checked Swift SMTP’s code. It replaces WordPress original
wp_mail()function by Swift SMTP’s revisedwp_mail()and the new one does not return proper value when it completed. This is wrong. It’s a misrevision ofwp_mail().Swift SMTP seems not updated since 2007-6-11. I suggest you not use Swift SMTP, or ask the author to update it.
Hi Miyoshi
Fantastic form and brilliantly easy to use. Thank you.
Can you tell me if you have a way that I can choose a URL to send the customer to when they submit the form?
Thanks
Rob
[…] Contact Form 7 – Without a contact form on your blog, you will probably never receive an e-mail by one of your readers. Sure you’ll get spam e-mails, but you will also receive a lot of e-mails regarding your blog. […]
[…] mentioned in yesterday’s post, I highly suggest the Contact Form 7 plugin. With this plugin, you would be able to create a contact form like the one you see on my […]
Hello Miyoshi,
Having a tough time trying to reduce the width of the drop down menu options using CONTACT FORM 7 — The drop downs span the entire width of the div.
Is there any way to reduce the width of the DROP DOWN menus?
Thanks for your time in advance.
Brendan
Rob Dore, currently it does not support such feature. I’m not sure about the necessity.
Brendan, you can do it with editting CSS stylesheet.
[…] a third link on the header, contact. It has been removed. This is because the plugin I was using, Contact Form 7, somehow messed up the site. One of the more annoying things it did was break the javascript that […]
[…] Contact Form 7 « iDeasilo het eenzame hartenbureau komt weer een stapje dichterbij… (tags: wordpress plugin contactform) […]