Categories
WordPress Plugins

Contact Form 7

This post is no longer updated. Move to Contact Form 7 official site.


Download | Plugin Homepage | FAQ | Support Forum

(日本語の説明はこちら)

Summary

screenshot

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.

  1. Upload whole contact-form-7 folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

Usage

  1. 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].

  2. Edit default “Contact form 1” or add new and save it.
  3. Copy [contact-form ...] code and paste it into the content of any posts you need the contact form.

FAQ

See Contact Form 7 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.

wpcf7-desc

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
email <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> </select>
checkbox <input type="checkbox" /> ...
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:author option to the tag of field which requires sender’s name.
    Example: [text* your-name akismet:author]
  • Add akismet:author_email option to the tag of field which requires sender’s email address.
    Example: [email* your-email akismet:author_email]
  • Add akismet:author_url option 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: and label-first options added.
1.7.4 (2007/12/30)
select+ and checkbox+ tag types removed. multiple and exclusive options added.
1.7.5 (2008/01/26)
Two fixes and include_blank option.
1.7.6 (2008/03/02)
New acceptance tag added.

1,401 replies on “Contact Form 7”

Hi,

Indeed, you are correct. Works fine IE 8, FF 2, and IE 7.

Was this plug-in causing the issue:

http://sw-guide.de/wordpress/plugins/maintenance-mode/

I already had excluded /contact/ but it does not then allow “/contact/%23wpcf7-f1-p9-o1” . :( Does that change at all? If I exclude that then both work fine together.

Sent plug-in author a note hoping that he can change how this works a bit.

Thanks for the idea to use Firebug (forgot about it hehe).

Take Care,

Will

Hello Miyoshi.

I really like the Plugin, but now that I have all but completed the contact page I am having some issues sending. When I click send it just hangs and never ends up showing a complete or incomplete page. I have tried a number of suggestions above with no resolution. Please Help!

http://www.myrnasbooknook.com/?page_id=27

Thank you,
Andrew

Hello Miyoshi,

I hope you can help me. I totally redesign your Contact form 7 to fit my design interest, and I still put you on the credits. I have a problem how can I “echo” the captcha in blank php file, I’m a not developer nor a programmer. I really need your help.

Thank and I love you! <3

HI

I am using your excellent captcha/form plugin for WordPress and it looks lovely – one of the nicest screen forms and captcha blocks I have seen for a long time, and very straightforward to use, although some slightly better ‘local’ documentation (pdf?) would be helpful?

One thing – I do a LOT of Joomla sites, and there is currently no really good form/captcha component/module like this – I think the Joomla community would LOVE YOU if you could make a component/module for Joomla?!

Let me know if you ever Beta anything and happy to test it.

bye for now

achintya

Andrew,

A possible cause is that other plugin or something block out Contact Form 7’s Ajax process. Try deactivate other plugins and test it.

Elizabeth,

I’m sorry, but I couldn’t understand what you are starting to do. If you just want to tweak design, you can do it all with CSS. If you need to change functionality of the program, you should know programming (not so hard, though) or hire a developer. Anyway, you can find all necessary code for CAPTCHA in captcha folder. Good luck :)

achintya,

Thank you! I haven’t used Joomla, but yes, I’m interested in it. I’m busy for other things these days so if someone else makes “Contact Form 7 for Joomla”, I’ll help it. How about you?

Honestly one of the biggest difficulty for me is documentation. Because English is second language for me and my writing skill is not enough. It takes long time for me to write a documentation each time. Recently I found a good service, though.

Hello,
I am using this plugin, I have made some modifications according to my needs and it works perfectly. The problem is that I would like some items would be horizontally placed, instead of a vertical placement.

Can anyone explain me, in a detailled way, how to modify this plugin for a single item horizontally placement, please?

Please leave me a reply to bt3932022449@gmail.com

Thanks for your help!

Thanks. I have no other plugins activated and the email does successfully get email, but the contact form never confirms. It acts as if it is still processing, but the email actually was sent successfully.

Thanks, Andrew

Hi,

really great plugin!!!
Is it possible to use the form in a template and not just in the content windows? – i’m putting together a form inside a template and want to use the same sending scripts?

Doesn’t look like the captcha works in WordPress 2.5. The image doesn’t show up. All I see are the words “captcha” in place of the graphic.

Also, the words “ajax loader” appear below the “Send” button in WordPress 2.5.

こんにちは、日本人友達。
My Japanese is very poor, but I’m still learning through Internet…

I just want to say that CAPTCHA image isn’t working for my… I insert this code [captchac captcha-180] and input code [captchar captcha-180] and picture isn’t showing…

Hello.
I’m trying out your plugin on my own sites and I really like the clean design of it. I receive eMails just fine, but I don’t seem to get a response when the eMail was sent on the website. The spinning wheel shows up and disappears but there is no text saying “thank you for sending me your comments” or something similar. Is there a way to configure it? I’m using Safari and Firefox 3 on OS X and the contact from is on http://www.mindnode.com/contact/

Thank you.

Hi. As a long time user of CF7 I thought you might like to know there are issues with other plugins in WP2.5. Specifically, DDSiteGen, Adsense Injection, and Privacy Policy. CF7 caused all of them to run incorrectly. Once CF7 was disabled, all problems went away.

It says that the email is sent, but not receiving the email after it is sent.

If you would like to email me I can provide you with Admin Panel log in so you can take a look?

Ryan,

The Mail (2) is similar functionality as BCC feature which other contact form plugins have. But Mail (2) is not BCC. It can send another mail, not as a copy.

Hi! Great plugin!

I used pxsmail and changed to your plugin because of its great flexibility!

If I can make a sugestion… Could you add some “info tags” like:
$_SERVER[‘REMOTE_ADDR’] > client’s IP Address
$_SERVER[‘HTTP_USER_AGENT’] > client’s browser info

One would enter these “info tags” directly in the mail template and they would return PHP Server Variables.

What do you think?

Can the hidden AJAX image, that sits next to the “submit” button, be moved from next to the button to underneath the button? Right now, the button is off centre as a result.

miyoshi,

Great! When is it due?
BTW, there is another “info tag” I remembered:
$_SERVER[‘HTTP_REFERER’] > last page visited (trying to infer how he/she reached the contact form)

Solved it I think! I also use the WP-Cache plugin, disabled the Contact page to be cached. Cleared the cache and voila! The contact form plugin – great by the way! – works fine in all browser in Windows and Mac.
(http://www.clicko.nl)

hi,

i found great this plugin! as it says at the begining, Simple but flexible.

i have made some corrections to the spanish translation. how do i send it to you?

you got my email, so just contact me and i’ll send it to you.

thanks!

Hey!

Thanks a lot for the great plugin!

Just a single question: Is there a way to send the person, who filled out the contact form, a copy of the message he sent me using the contact form?

For example: peter@peters-e-mail.com fills out the contact form, and an E-Mail is sent to my mail account as well as his?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s