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”

[…] 3.Contact Form 7 A causa di problemi di spam o spybot in cerca del vostro indirizzo e-mail, è assolutamente sconsigliato aggiungere un link diretto al vostro indirizzo di posta direttamente sul blog.Con Contact Form 7 potrete creare form di contatto per i vostri utenti e lettori direttamente sul blog senza avere problemi di spam o di rischio pubblico per il vostro indirizzo e-mail.Davvero Consigliato. […]

[…] Contact Form 7 – Form software for WordPress. Although created to be a Contact form submission tool; you can define multiple forms and have them sent to different emails when submitted. Has a nice editor, but make sure you add the form fields to the message body of the email or your forms will submit nothing but a blank email. […]

Everything was working properly until I have updated to the newest release.

Now all my check-box answers are in the same row. Previously “answer1″answer2” was making them in separate rows, but after new release is being printed as text. Tried cheking box on exclusive, but doesnt help, still all check-box answers are in the same row. Looks ugly :\

There is a minor typo in the German translation of the RED error message after the sending:

“Das Versenden der E-Mail war fehlerhaft. Bitte versuchen Sie es nocheinmal zu einem späteren Zeitpunkt oder informieren Sie den Adminstrator.”

It should be written:
“…noch einmal…” in stead of “…nocheinmal…”

Regards!
mats

Great plugin! If it came with an option to set readonly and tabindex attributes for form fields, it would be perfect. But even now, it’s awesome. Thank you!

I am sorry,because:I do not know much English.My Problem:Wp Contact Form 7 with the theme of conflict Creativepress.How can I solve this problem?Thank you.

I can not get this to work – if anyone ( like Jussi or anyone who can assist me for 20 minutes ) can contact me – please do – can’t get the form to ‘activate’ by
emailing the contents once fullfilled. Please email me at bocsmail@mac.com

I do not receive any emails with this plug-in. Used it long time ago and worked fine. With new blogs and updated WP no longer can get this plug-in to work and wonder how long I have gone without knowing why I was not getting any orders. Will have to find something else…so sad.

For all of you who doesn’t get any message.
Open Contact Form 7 Settings & check in the ‘Mail’ section below that the email written in ‘To:’ is the right one and not you@yourdomain.com.
Maybe just maybe the last update has override it :(

A. Thank you for the plugin. It’s fantastic.

B. How do I make it go to a success page instead of doing the ajax request? I need to record the submission of a form inside Google Analytics.

hello Sir,

Once I happened to post a question here in this blogm, and when I did not get a reply, the moderator told me to post the questions in the forum.

I happened to post a question regarding contact form 7 some days ago. I did not get any kind of help.

ANy kind of help is greatly apprciated.

the question is posted at

http://wordpress.org/support/topic/307356?replies=1

thank you sir,

Helllo there,

I have the contact form in which i have a dropdown menu for the states. I was able to make my other fields mandatory, but I was not able to make the state field mandatory..can anyone please tell me where to put the ‘*” mark in this code, to make the dropdown menu of states mandatory…please help thank you in advance…

State
[select menu-695 “Alabama ” “Alaska ” “Arkansas ” “Arizona ” “California ” “Colorado ” “Conneticut ” “Delaware ” “Florida ” “Georgia ” “Idaho ” “Illinois ” .. ]

How can I hide this plugin from users. I dont want it show in the left column except for the admin!

Thanks,

Troy

I thought I had the validation message on my site changed, but it’s not. I can’t figure out where to change it. Any ideas?

OK, I’ll be the one to ask–

Why would only the admin need to see it? Usually the admin is the one who GETS the emails! And presumably if the admin and the owner are two different people, the admin already has the owner’s email address to just use regular email!

:)

Sorry for not having the actual answer, though. Probably more helpful to get the answer than to be questioned about your needs. ;-)

ya… you’re completely wrong.
:)

I’m talking about the message that the user sees after completing the form.

I guess I thought people would know from using it a lot. Also, I said nothing about the admin.

Any ideas? I tried functions.php, but no go.

-Eric

Eric, since you said nothing about the admin, you might have wanted to read up an extra post to solve the riddle of why you thought I was making no sense… I was replying to Troy not to you.

At the time I replied, your post wasn’t visible so I didn’t think it necessary to say “Troy:”

;-)

I am sorry,because:I do not know much English.My Problem:Wp Contact Form 7 with the theme of conflict Creativepress.How can I solve this problem?Thank you.

HI have successfully installed the plugin but when I receive the email it has the following in it and not the information entered into the form??

[text* your-name]
[text your-organisation]
[email* your-email]
[text* your-telephone]
[textarea* your-address 30×5]
[textarea your-message 30×5]

Can you help?

Kind regards
Amanda

I had same oncem, realised you had to remove the descriptor
Try this
[your-name]
[you-organisation]
[your-email]
[your-telephone]
[your-address 30×5]
[you-message30x5]

since the latest update the “message context” field and “email-from” and “subject” fields are CLEARED …
Seems like it has to do something with the content of the “message context” field, with just a small text inside it works, but when I copy the “form” content in the “message context” field (which I allways do 1st to test the form), the “message context” field (and email-from and subject) are CLEARED upon saving the form …
This is very annoying and makes it unuseable for me :-(

Instructions could be better but this is a fantastic contact form once you figure it out. Thanks, Takayuki!

In version 2.0.2 everything still works, but in 2.0.4. the content of the “mail” box is cleared for some reason. That must be the reaseon that emails are not sent anymore …
To bad for such a good product :-(
I hope it will be fixed soon !

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