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”
I’m getting a 404 “Page not found” error, but if I’m logged in as the admin the form shows up and works perfectly. Any ideas?
Jay,
The most likely cause is that your page has “draft” or “private” status, so not “published” for non-admin users.
Miyoshi,
Long time since I visit your page! I’m very busy this past few weeks. BTW Its seem you contact form is growing and growing and thats was really great! I’m planing to buy my own domain name this January and I put your contact form 7 on the credits.:) Man I have a little question. Example I have a visitor then she sign up on the contact form and she want a copy of her message that she sent me using checkbox. I hope you understand that.
Thanks!
Hi Jonathan,
You mean “BCC” feature which other plugins have, right? Contact Form 7’s “Mail (2)” feature is like it (you can find it at the bottom of plugin’s admin page), but it always tries to send a copy regardless of checkbox is checked or not. I have a plan to make it possible in the future, but so far it’s not, sorry.
[…] Contact Form 7 – simple, supports multiple forms, spam filtering and CAPTCHA. […]
Thanks again for all your wonderful work on this plugin.
I wrote you before about removing the Contact Form 7 code in the head of pages that do not have contact forms.
I’ve employed
within my template (as you instructed in your comment from early December).
It worked on a previous version, but I noticed (with version 1.7.4) that the Contact Form 7 code within the head is NOT removed from pages that do not have the Contact Form.
Am I doing something wrong?
Thanks again!!
Copernicus,
This one?
Nothing has been changed around that workaround since 1.7.1. I just confirmed it was still working on my site. I’m not sure but something is wrong.
Dear Miyoshi san,
Just a quick note to say thank you for this wonderful plug-in. I really love it for the all the different features like spam and bot filtering and for having the option to create more than 1 form.
To add to Copernicus’ remark. I tried to remove the code using your suggestion, but it doesn’t seem to work. For your information, I’m on WP 2.3.2.
Anyway thanks again!
Hmm. Indeed there is a problem. I checked the other sites that I’ve employed that code on and it’s not working on them either.
The <HEAD> section still has the link to the CF7 CSS, CDATA bit and link to the .js file on pages that do not have the contact form.
Could it be that something has gone wrong in the copying of
<?php remove_action('wp_head', array(&$wpcf7, 'wp_head')); ?>…or is that the same code that you’re already using?
I’m sorry to be a bother about this; I hope I’m not overlooking something simple.
As always: thank you!
mmmm, I tested again on WordPress 2.3.2 and Contact Form 7 1.7.4, confirmed it works.
I did:
1. Install WordPress and Contact Form 7,
2. Open default theme’s single.php,
3. Add this code before
<?php get_header(); ?><?php remove_action('wp_head', array(&$wpcf7, 'wp_head')); ?>4. Open
http://(mysite)/?p=1(“Hello world!” post) with Firefox and see the HTML source,5. And confirm that there is NOT a “contact-form-7.js” script line.
[…] Contact Form 7-A basic contact form […]
Does this plugin offer a thank you page redirect on form submit? If not does anyone know one that does?
Thanks!
Pam,
This plugin does not offer it. You’ll need a bit hacks in Ajax code. I don’t know other ones do it, sorry.
[…] Contact Form 7 […]
Hi Takayuki,
I’m searching to make this plugin working with the last jQuery 1.2.2, but I still have problems: do you have any clue with that?
Many thanks for your plugin!
Hi Paolo,
Thanks for comment. What problem do you have?
I’m using Contact Form 7 on trunk version WordPress and jQuery 1.2.2, but I have no problem.
Is there any report that there are some problems regarding “?wpcf7=json” that is being added in the Google search result
[…] site. And it does not work well with me that I have decided to change it for a different plug-in. [ Contact Form 7 […]
Dexter,
Thank you for your detailed report. I haven’t known that. I don’t think it is that harmful to SEO, but I’ll consider workarounds.
hi there
dexter, you arouse a good problem…many people are having the same issue and the same concern
This wpcf7=json is not good for SEO since google tend to discard pages with addresses and contents too alike. I use this wonderful plugin and i like it a lot but i am a little concerned since i have about 40 pages with wpcf7=json extension
Is it possible to make Contact Form 7 compatible with Polyglot?
Good plugins! thank you!
Thanks miyoshi for your immidiate response to this
Awesome plug-in!!
Oddly Subject and Your Message is missing “required”.
See:
And whats the point of using:
Your Site
[text your-url akismet:author_url]
Nothing about the URL is sent in the eamil so whats the point?
Also, any chance you could add a “security” feature?
That is the ability to have the plug-in include with every email for example below. Thanks!
E-Mail Address: ..
Web Site Address: ..
IP Address: ..
Host Name: ..
User Agent: ..
Referral: ..
I too would like to see this great plug-in SEO friendly.
Would also be nice if you could customize those Good, Validation Error, SPAM, and Failed messages without having to edit the source code. ;) Thanks!
Hi,
Whoops, sorry for the spam, did not mean to click submit last time.
One last thing, anyway you could please make it output valid xhtml strict?
Thanks again and hope you had a great weekend!!
Will
[…] I also have a handy “Contact” page up at the top of my blog, this one is powered by Contact Form 7 […]
Also, the captcha is no longer working. No images are shown, just the text area. Yes it worked fine before the update. So I know I am doing it correctly. :(
Will,
Please read this post first, it explains requirement for using CAPTCHA. And you should make sure that your CAPTCHA tag is used correctly and image file is generated successfully.
The problem was the tmp folder some how got chmod 755 again.
Hey i love this little plugin the only bug bear i have is that once you submit a form it clears the form and the confirmation message is at the bottom, why do you not hide the form so the confirmation message is clearly there.
Thanks
Matt
Is there a way to (easily) put the text side by side with the input fields? Each goes on top of the field….
[…] discovered Subscribe2 and Contact Form 7 to handle my email notification and email response forms respectively. I messed about with the CSS […]
[…] support with ajax based submissions, akismet spam protection & Bot prevention with CAPTCHA. Plugin Developer : Plugin Download Link cForms : The most advanced wordpress plugin for contact forms developed […]
Matthew Hughes,
I don’t think it’s a simple way for many users, so I won’t fix it. Sorry.
Passengers Only,
You can do it easily. Edit Form field.
You can find Contact Form 7’s admin page on [Options] – [Contact Form 7].
Thanks.
miyoshi
Awesome plugin. I’ve read through the comments and your replies in hopes of solving this.
The plugin is installed and works very well. I have tested it and reconfigured it over and over. Uninstalled and reinstalled it but to no avail…
When I click submit, I receive an email. Except, the body of the email contains [your-message] instead of the content of the form. I assume this is a simple fix that I’m just overlooking. Suggestions?
WP v2.3.3
Gmail
Darren
my pages on google are experiencing this string
&wpcf7=json or multiple of them such as
http://www.mysitename.com/…..&wpcf7=json&wpcf7=json
can you provide for a solution…google has hundred of this indexed pages of mine and i really think that it could harm something
thanks
look at this page of mine
I think it is not normal
http://www.webtlk.com/category/web-sites/?wpcf7=json&wpcf7=json&wpcf7=json&wpcf7=json
Darren,
Tag with a name in Mail fields are replaced by user input with the same name.
[your-message]will be replaced by[textarea your-message blar blar]tag in Form field.I hope this will help.
fra,
See the release announcement for v1.7.5.
I think you are confusing Google’s issue with the plugin’s issue. Except Google itself, nobody can control Google’s index directly.
And this is a page on this blog. Do you think WordPress.com is not normal?
https://ideasilo.wordpress.com/?wpcf7=json&wpcf7=json&wpcf7=json&wpcf7=json
thank you miyoshi for your reply. now i understand that you have already solved the issue on your plgin. As far as google is concerned i am trying to tweaking the robots.txt in order not to index those pages on google. do you think it is a good idea? you know, google penalised my blog heavily and during these last ten days i got 40 visitors less and the count is still dropping drammatically!
give some tips please!
really good plugin
[…] you sooner or later. But where does that string come from? Apparently from a WordPress plugin named Contact Form 7. This good plugin (I still have it) was using the code only during AJAX submitting (POST) process, […]
I am having the code shown on my contacts page under the contact from. you can see here:
http://adogbarks.co.uk/blog/?page_id=21
i’m not sure what is causing this?
any help, much appreciated.
[…] Contact Form 7 1.7.3 » Takayuki Miyoshi (url) Just another contact form plugin. Simple but flexible. […]
I got captcha up and running on localhost but when I moved to web, the captcha graphic wouldn’t display. What could be the problem?
I already tried removing and installing the plugin via web (instead of just FTPing my localhost) and it still doesn’t work.
never mind…i just read the solution :)
have to make contact-form-7/captcha/tmp writable.
already did and it worked.
Hi,
i want to know if i can use the FORM outside POST or PAGE. I got a if question if visitor is logged or not. if not NO LOOP will run. in that case i got a text right in my phpcode like “fill the FORM and i send you a PASSWORD”. how can i ad the formcode >>>[contact-form 2 "Register"]<<< right in PHP?
cheers
denis
Denis,
[contact-form ......]codes are just placeholders which are expected to be replaced through WordPress’s filters, not for PHP interpreter. Currently they have to be in post/page contents or text widget contents.If you want to know whether visitor is logged user or not, you can use
is_user_logged_in().Hi,
thanks for the quick reply. I got that with the is_user_logged_in(). I fixed it with a link to a page where the form is.
Thanks a lot
Cheers
denis