Contact Form 7

April 30, 2007

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

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.

Requires WordPress 2.2 or higher.

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

391 Responses to “Contact Form 7”

  1. ふりっぷ Says:

    これはブログの文字コードがEUC-JPでも使用できますか?

  2. miyoshi Says:

    試してないですけどたぶん大丈夫だと思います。

  3. ray Says:

    ありがとうございます。まさに探していたものでした。

  4. プラグインで出来てしまう « Still Searching Says:

    [...] といったことを考えていました。でもこんなことを考えているヒトって実は多いんじゃないのと思い、フォーラムを眺めているとやはりありました。WordPress.comでは知らない世界、プラグインというのがあって、そこに入れることによって使えるらしいです。で、早速いくつか試してみたところ良い感触。Contact Form ][というのとかかなりシンプルな感じでphpそのものを弄っているうちに何とかなりそうと思いました。 しかしここでふと考えたこと。必要なフォームは一つではなく、DNA、タンパク一次構造、利用報告と今の時点で既に3種類。そして予定ではさらに増える。 その都度フォルダを切ってというのでは混乱は必至だし。 と思ってさらに探すと完璧なまでに欲しいものをつくっているネ申がいました。かなり近所に。忘れていましたがここはWordPressでした。 [...]

  5. smilkobuta Says:

    色々試してみましたが、一番使いやすいですね。
    日本語環境の人は、これ以外のものと比較する必要はないかも。

  6. ひろし Says:

    すばらしいプラグインありがとうございます。

    質問なのですが、文字コードがEUC-JP環境で、このプラグインを利用しようとしたら、管理画面が英語ばかりで日本語が表示されていないのですが、どうしたら日本語表示になるのでしょうか。

  7. miyoshi Says:

    ひろしさん

    お褒めにあずかり光栄です。

    さて、添付の .po/.mo ファイルは UTF-8 ベースで作っているので EUC-JP の環境だと機能しないと思います。EUC-JP 版をどなたか作ってくれないかと期待してたりもします …

    でもまあ日本語化しなくても管理画面のメニュー表記が英語になるだけなので(フォームの文面は日本語で書けますし)、あまり気にしなくてもよろしいのではないかという気がしないでもないです。

  8. ひろし Says:

    ご回答ありがとうございます。

    現状EUC-JP の環境だと日本語表示できないんですね。。

    このプラグインのさらなるバージョンアップを期待しています。
    特に、
     ・もっとフォームタイプを (選択、チェックボックス、日付、URL、電話番号、…)

    これができるといろんな用途に利用できるので期待大です。

    また、質問なのですが、フォーム部分はHTTPSで通信させて、その他の画面はHTTPで通信させるようなことは可能なのでしょうか。
    (個人情報などをフォーム入力する時などSSL通信は必須かと思いますので)

  9. miyoshi Says:

    > フォーム部分はHTTPSで通信させて、その他の画面はHTTPで通信させるようなことは可能なのでしょうか。

    分けるのは無理です。ぜんぶ HTTPS でやればよろしいかと。

  10. tommy Says:

    別の方もコメントしていましたが、
    プルダウン、チェックボックス、ラジオボタン辺りに
    対応してもらえると非常に助かります。

    今後のヴァージョンアップの際に考慮お願いします☆

  11. tommy Says:

    先ほどヴァージョンアップの際に~と要望を述べていましたが
    下記プラグインにてその辺りをカバーできていることを確認できました。
    http://www.deliciousdays.com/cforms-plugin

    今回はこちらを使用しようと思います。取り急ぎご報告まで☆

  12. MOO Says:

    すばらしいプラグインありがとうございます。
    複数の問い合わせを作ることができ、重宝してます。

    できましたらば
    「Option>Recipient address:」で、E-mailだけでなく、フォームを受け取るURLも設定できるとアンケートフォームにもなるかなぁと思います。

    でも本当に使いやすいプラグインありがとうございます。

  13. shibomb Says:

    こんにちは。非常に有用なプラグインを公開いただき、ありがとうございます。
    現在、PC&ケータイ両対応のサイトを作成しており、MobileEye+というプラグインを用いてケータイ対応しています。
    ケータイにおいて、Contact Form 7のページは表示は出来ているのですが、ケータイから送信すると、送られてきたメールが文字化けします。
    (サイトはUTF-8ですが、MobileEye+は、Shift-JISに変換しているために、メール送信部分でのエンコードでおかしくなっていると推測しています。)
    ContactForm7に該当する話ではないのかも知れませんが、このような場合の対処方法(どこに何を入れたら・こんなプラグインがある)などの情報があれば、アドバイス頂けないでしょうか・・・

  14. miyoshi Says:

    shibomb さん、

    なかなか厄介な問題ですね。基本的に Contact Form 7 自身はメールの送信を行っていないので、このプラグインで解決できることではなさそうです。どこで解決できるかというと、メールの送信を行っている関数 wp_mail() があるので、この中で mb_convert_encoding() とかを使って文字コードの変換をすればよいと思います。

    残念ながらプラグインでそれを実現するものは知らないです。この程度のアドバイスですみませんが、やってみてうまく行ったらぜひ教えてください。

  15. Tomomi Says:

    使いやすいプラグインをありがとうございます。
    WordPress2.2で無事に動きました。

    ですが、Nippon2を有効にしていると件名が
    「=?UTF-8?B?44OG44K544OI?=」
    などのように化けてしまいます。
    無効にしていれば問題なく作動するのですが…
    特に気にしなくていいのでしょうか。

    それと、Contact Form ][ にあったメールのコピーを送る機能ですが
    実装のご予定はありますか?

  16. miyoshi Says:

    Tomomi さん、

    ですが、Nippon2を有効にしていると件名が
    「=?UTF-8?B?44OG44K544OI?=」
    などのように化けてしまいます。

    メールを読むのに使われているアプリケーションが UTF-8 に対応していないケースが考えられます。古い Outlook Express なんかはそうらしいです。

    それと、Contact Form ][ にあったメールのコピーを送る機能ですが
    実装のご予定はありますか?

    あります。でもしばらく時間がとれないので何ヶ月か先になると思います。

  17. Tomomi Says:

    明確なご説明ありがとうございます。

    わたしが使っているのはOutlook2003ですが、
    なぜか件名だけUTF-8で読んでくれないようでした。
    対応してるはずだと思ってたんですが…。

    Thunderbirdなどの導入も視野に入れて
    もう少し調べてみようと思います。

    コピー送信機能はのんびりお待ちしてますね。

    季節の変わり目ですのでくれぐれもご自愛ください。

  18. John H Gohde Says:

    The default width of the name, email, and subject fields is too short. How can you make them longer?

  19. miyoshi Says:

    John,
    You can set options like below:

    [text* your-name "Your Name" 100/200]

    This means “size is 100, maxlength is 200″.

  20. Contact Form 7 | わーどぷれすっ! Says:

    [...] Contact Form 7 « iDeasilo [...]

  21. gabriel Says:

    How can I use a drop-down menu with predefined customizable subjects in contact form?

  22. miyoshi Says:

    Gabriel,
    I have a plan but it’s not implemented yet, sorry.
    Please check next release.
    Thanks.

  23. VinodPandey.Com » Blog Archive » 5 wordpress plugins you shouldn’t live without Says:

    [...] 3.Contact Form 7 Contact form plugin.This plugin is very simple and flexible.Multiple contact forms can be added.Very nice way to get feedback from visitors without revealing your email ID.Very fast method for the visitors to send feedback too (besides commenting). [...]

  24. jas Says:

    hi, the form seems to only show just on the post page itself. is there a way to get it to show up on the front page with all the recent posts?

  25. miyoshi Says:

    jas,

    No, I decided it not to show on archive pages since this version, now it’s shown only on singular pages, because I thought it is enough for most users. Do you need it? I’m reconsidering it for future release. Thanks.

  26. Mohammad Ali Says:

    hi,
    i install your plugin on my localhoste wp and put that cod in latest post but dose not show any things in my page.
    just show [contact-form …… ?
    can you help me ?

  27. miyoshi Says:

    Mohammad,
    It sounds odd. It should be replaced by a form even if you use on localhost. If you can test on another host which I can see, I might find out.

  28. Mohammad Ali Says:

    Ok !
    I put it in my host and if is necessary i tell you to see that.
    ths.

  29. asrai Says:

    Just dropping in to say thanks..I downloaded your release coz I loved your tutorial with images on it..hehe

    Looking forward to your next release..

  30. Mehedi Says:

    Thanks, great plugin.

  31. Mohammad Ali Says:

    hi.
    i install this plugin in unlocalhost !!!!! and it work without any problem. good !
    but i have a simple question . what dose ajax do for this plugin ? when i click on send email buttom , the page refreshed and i cant see any ajax effect on page.

  32. miyoshi Says:

    Mohammad,

    I think there are JavaScript errors occurring so that jQuery functions aren’t called.
    Could you show me the URL?

  33. Mohammad Ali Says:

    this error occure in wp-admin and i must take a snapshot frpm it and send to you. because when i fill the boxes with utf-8 character, that error occured.

  34. miyoshi Says:

    Wp-admin?? It doesn’t take Ajax effect on admin pages now. Hmm…
    Anyway, it’s interesting that UTF-8 cause. Please tell me the update.

  35. Mohammad Ali Says:

    ops ! I mixed the wp-poll with your plugin !!!! sory for this mistake.
    see this page, http://sharh.ir/wp/?p=3
    when i send mail, the page refreshed and ther is not ane ajax effect .

  36. miyoshi Says:

    D’oh! I found the cause! I mistook to use script loader and jquery-form was not loaded on WordPress 2.2.x. I haven’t realized it because it works on 2.3 trunk version and I mainly test on the environment.

    I released new 1.3.1 in a hurry, so please update and tell me the result. It must be Ajax this time.

    Thank you very much for telling me the problem, Mohammad!

  37. links for 2007-08-27 at orioa Says:

    [...] Contact Form 7 « iDeasilo コンタクトフォーム作成プラグイン (tags: wordpress plugin) [...]

  38. imsuden Says:

    I have installed this plugin (which looks great), but I don’t receive an email when the form is filled in. I have installed the plugin in the normal way (by copying the folder to the plugins folder) - is there anything else I need to do?

    Thanks!

  39. Toni Says:

    I wanted to test the contact form! Thank you :-)

  40. Mohammad Ali Says:

    Hi,
    thank you very much for this new version.
    I use new version of this plugin, Good. it work very nice! whit ajax effects in this url : http://sharh.ir/wp/?p=5
    But i put it in this blog, (a persian blog http://www.navideshahadat.com/ ) you can see it in left side-bar, but there are no ajax effect on it!!!!
    see and tell me what should I do ?
    thank you.

  41. miyoshi Says:

    imsuden,

    no, there should be nothing else you need to do if without other problems. Please check these points:

    - You see message block under the form? Or no change happens?
    - Can you receive other mails from WordPress installed server like comment notification?
    - Didn’t anti-spam eat the mail?

    If you can tell me the URL you use this plugin, may clue more.

  42. miyoshi Says:

    Mohammad,

    Thank you for the reporting and I’m glad to hear you like it!

    By the way I saw the navideshahadat.com site. It seems that the site loads prototype.js, and my plugin loads jquery.js and uses $ variable, then this causes variable name conflict. I fixed plugin to avoid this conflict on svn trunk. The next version will be released on September. If you need it now, try Development Version, please.

    Thank you!

  43. grayf0x Says:

    すばらしいプラグインですね。
    日本語環境ならこれでキマリでいいと思いました。

    しかし…送信前の確認画面(プレビュー)を表示できるプラグインを探しているのですが、無いもんですねぇ(汗
    このプラグインが対応してくれるととってもうれしいんですが。

  44. miyoshi Says:

    grayf0x さん、

    プレビューってのは、フォームに入力するゲスト向けにってことですか? そういえば考えてなかったです。

    シンプルにまとめられれば導入してみたいと思います。コメントどうもありがとうございます。

  45. hsmombrc Says:

    Hi there =o) I have this installed and form comes up just fine on my blog, but when I try to submit a message to test it I get the following error:

    Failed to send your message. Please try later or contact administrator by other way.

    Any suggestions on how to troubleshoot this issue?

    Thank you in advance!
    Susie

  46. miyoshi Says:

    Susie,

    There are two cases possible.

    Case 1: Error of sending mail is occurring on your server. In this case, the border color of the error message is red. This is not matter of the plugin. You should check PHP settings and condition of your server.

    Case 2: When you enables Akismet option and Akismet judges as spam, you see the same error message. In this case, the border color of the error message is orange. If you use Akismet, see this post and set up your tags with akismet-related options.

    I hope this answer help. Thanks.

  47. hsmombrc Says:

    Thank you so much for your help! It was the Akismet issue! I did that the post said and voila! It worked! Awesome little gadget and I appreciate the quick response!

    Thanks again!
    Susie

  48. George Says:

    He I have the plugin working and it’s just great!!!

    Newbie Question: I can get it to come up in a post but what if I wanted to link to it from a link called Contact us and not show up as a post but just a simple contact us page? that I could link it?

    sorry for the dumb question!

    -G

  49. miyoshi Says:

    George,

    Thank you for your comment. To answer your question, you can use it both on Posts and Pages with no problem. Are you seeing any problem?

  50. George Says:

    No problems or errors I am just clueless on how to link to it from a url and without using a page or post.

    http://www.sample.com/???????? not a /Post=3

    am I making sense.

    apologize in advance for my ignorance.

    -G

  51. miyoshi Says:

    George,

    You cannot call or link to this contact form without using a page or post. It is needed to be embedded in the content area of a page or post.

  52. Denis Says:

    Hi,
    is it possible to put the function-data out of the website into the functions.php ?

    cheers
    Denis

  53. miyoshi Says:

    Denis,

    Can you tell me more specific?
    You mean including this plugin’s contact form into a theme?

  54. ひゅっくり Says:

    とても簡単・便利なプラグインなので有り難く使わせて戴いております。

    javascript・cssがすべてのページのヘッダに自動挿入されていますが、これを実際にフォームを設置したページにのみ挿入するようになってくれるとありがたいです。
    自動で挿入するか否かを判断してくれるのがベストですが、たとえば管理画面からページidを指定して、指定されたidのページにのみ挿入するなど…

    既存のスクリプトと干渉してしまうので、現在はソースから自動挿入部分をさっくり削除して手動で挿入して使用しています。

    ご検討下されば幸いです。

  55. miyoshi Says:

    ひゅっくり さん、

    コメントどうもありがとうございます。おっしゃるとおりで、いろいろと方法を検討しているんですがまだいい方法が思いつかないんです。シンプルな方法で自動で判断できるやり方があればすぐに取り入れるんですが…。

    あと、既存のスクリプトとの干渉というのは、これはこれでまた別の解決が必要と思うので、よかったら詳しく教えてください。

  56. rome Says:

    Hello,

    I really like your plugin, simple without all the extra stuf I need. But it seems when the form is filled out and sent, it shows a “sent successfully” message. But when I receive the message, it doesn’t show the message, but instead shows the [your-subject] and [your-message] tags in the email, no sender, no message. Did I miss a step? Please help,

    Thank you

  57. rome Says:

    Nevermind, i fixed it, I changed the name of the text field and forgot to change the tag in the email format. One question though, is there a way to fix the apostraphes in the message? I get backslashes in my received messages when an apostraphe is used in the sent message. Is this a php thing?

  58. miyoshi Says:

    rome,

    I get backslashes in my received messages when an apostraphe is used in the sent message. Is this a php thing?

    Ah, it’s a bug. I’ll fix it in next release. Thanks for telling me!

  59. George Huff Says:

    I got so far as to build my contact form - and then realized it won’t work in a sidebar. Up until then I was really impressed with ease of use.

    Any plans for putting it in a sidebar for a future release? Or hacks you can point me towards?

    Keep up the good work.

    Thanks.

  60. miyoshi Says:

    George,

    I don’t have a plan so far. But it seems that many people need sidebar option. I’ll consider it.

    Thanks

  61. Denis Says:

    @miyoshi

    >>is it possible to put the function-data out of the website into the functions.php ?<<

    When i put the Contact form into my page and look at the code there is a lot of code posted into my page. is it possible to put this code anywhere else, maybe into the functions.php ?

    an other question, can i put php into the Form ? like IP adress and date like date(’d.m.Y’)

    cheers
    denis

  62. miyoshi Says:

    Denis,

    No, unfortunately, all features you say are not supported. They are too complicated to implement in this simple plugin. But I’m considering to do [ip_addr] tag or such…

    Thanks

  63. Denis Says:

    @miyoshi

    and what about putting the function code outside the page ?

    and can you take a look, please: http://www.centerstage.de/mhq/kontakt/

    why i the space between the button and the down border so big, looks like a double

    IP and DATE is not so importent cause its mostly all in the email header.

    cheers
    denis

  64. miyoshi Says:

    Denis,

    1) It’s must be used in inside of content area of Post/Page. You can’t put it outside of them so far.

    2) There are empty <div> element in the bottom, so there are spaces. You should add padding to the “.wpcf7″ in CSS.

    Thanks

  65. Denis Says:

    Can you please take a look an the thumbnail i put into the page ?

    http://www.centerstage.de/mhq/kontakt/

    i cant find that piece of code. its not mine ;-)

  66. miyoshi Says:

    You can find it just after closing </form>.

    <div class="wpcf7-response-output"></div>

  67. Tomek Goździewicz Says:

    Hi,
    I’ve just instaled cf7 and it works great. Thanks for it. :)
    But, sorry for dumb question, how to change the language? My language is supported (Polish) but I don’t know how to change it.

  68. miyoshi Says:

    Tomek,

    Thanks for your comment. You need to edit wp-config.php as

    define ('WPLANG', 'pl_PL');

    to use Polish localization. See Installing WordPress in Your Language on WordPress Codex.

  69. Tomek Goździewicz Says:

    Thanks for info. I’ve already used Polish language on my WP instalation, but localization file was named ‘pl.mo’ (and also WPLANG was set to ‘pl’ only). Now all works fine.

    Thank you!

  70. Wordpress 2.30 : Preparing theme for WP 2.3 Says:

    [...] Contact Form 7 1.4.4 [...]

  71. steve59 Says:

    have installed version 7.1.4.4 and it appears activating Akimet in the form options is causing a send message fail.

    without Akimet sending is successful

    ideas?

  72. 21 Quality WordPress Plugins That Work on Version 2.3 Says:

    [...] Contact Form 7 [...]

  73. lorenzone92 Says:

    @steve59: Yes, you’re right. When I active Akismet in the form options the message doesn’t send.
    When I updated my Wp to 2.3 this plugin don’t worked!!

  74. Rasmus Johnsen Says:

    Hi,

    Looks like a really nice plugin. I’m having problems with configuration. I tried out the sample you have put in for beginners. It worked fine. Tried to put in:

    [select noget "windsufing" "surfing"]

    The select option appears in my form on my test-site - I select - but in the email I receive there is no indication of my selection.

    Any idea?

    Thanks!

  75. Rasmus Johnsen Says:

    I figured it out - sorry!!

  76. atfactory Says:

    はじめまして。シンプルでわかり易く素晴らしいプラグインですね。

    一つ質問があるのですが、[contact-form ...] のコードをコピーして、コンタクトフォームを表示させたい投稿の本文にそれをペーストする。とありますが、これをテンプレート内に直接記述する事はできますでしょうか。試しているのですが中々うまくいかず、可能であればご教授いただけると助かります。宜しくお願いいたします。

  77. miyoshi Says:

    atfactory さん、

    「テンプレート内に直接記述する」というのが具体的にどういうことを指しているのかちょっとよくわからなかったのですが…、すみませんが詳しく教えていただけますか?

  78. atfactory Says:

    早々にご返信いただきありがとうございます。説明が足りなくスミマセン。
    現在投稿内容に[contact-form 1 "Contact form 1"]を記述して読み込みを行っているのですが、コメントフォームのような扱いでシングルページに常時同じフォームを設置したいと考えております。そこで、毎回投稿内容に記述するのも面倒なのでsingle.php内にこのコードを埋め込んで、読み込ませようと考えたのですがよくわからずコメントさせていただきました。お手数おかけしますが宜しくお願いいたします。

  79. miyoshi Says:

    ああ、なるほど。テンプレートってテーマのテンプレートのことだったんですね。今のところそういった使い方はサポートしていません。ただ、ご要望のテーマファイルへの埋め込みや、サイドバーのウィジェットでの使用といったニーズが一定数あるようですので、将来的にはそういったものも考えてみたいとは思っています。他にまだやることが山ほど残っているのでだいぶ先にはなりますが。気長にお待ちください。

  80. atfactory Says:

    ありがとうございます。気長に待ちます(笑)
    この度はお忙しい所、ご返答ありがとうございました。

  81. rucx Says:

    best contact form plugin for wordpress so far! Just wondering if the tons of lines it adds to the source code in the header is necessary and maybe bad for SEO and Performance?

  82. miyoshi Says:

    rucx,

    Thanks. Maybe your suggestion is right. I’m thinking exclude them into a file. Thank you for good advice.

  83. Wordpress 2.3으로 옮겨가기전 확인 사항 Says:

    [...] : 2.0.7버전인데 WP 2.3에 대한 특별한 언급이 없다. Contact Form 7를 설치하였으나 별다른 문제가 없으면 WP-ContactForm을 계속 사용할 [...]

  84. Paweł Rabinek Says:

    Thanks! Best contact plugin ever!

  85. rucx Says:

    so now its perfect!
    Your awesome Miyoshi!

  86. jeffqc Says:

    hello
    nice contact form
    all is doing good here but
    when im trying to send myself a test mail
    i dont receive the mail in my mailbox:(
    here is the url for my contatc from
    http://quebec-usa.com/contactez-nous/

  87. miyoshi Says:

    jeffqc,

    Didn’t you see a result message after you submited? If you saw “succeeded” message, mail was sent correctly, check your spam filter. If you saw “failed” one, it failed, something was wrong.

  88. jeffqc Says:

    i get this message:
    Your message was sent successfully. Thanks.

    i dont have any spam filtrer and have try with several mail!

  89. miyoshi Says:

    jeffqc,

    It means that mail sending function has successfully completed. If you don’t receive a mail, mail servers or something were not working properly. Do you receive other mails form WordPress, such as comment notification?

  90. Mike Says:

    Hello. Great plugin! Thank you for all your work!
    I’m wondering if there is a way to filter out the several lines of code that the Contact Form plugin places into the HEAD section of the page for pages that are NOT using the contact form.

    Other plugins allow filter of the code with something like
    placed within conditional tags.

    Is anything similar possible with this plugin so all the Contact Form 7 related “head” tags do not show up on every other page in the site?

  91. miyoshi Says:

    Mike,
    Thanks for comment. The latest version is still harming? Just six lines it inserts.

  92. Livingston Samuel Says:

    I’m using this contact from in my blog, and now I’m free from spams.

    thanks for this wonderful plugin. :)

    Is there a way to prevent the WP-Contact form javascript file from being included in all the pages??

  93. vadim Says:

    I installed your plugin but it hang ups when I try to send an email and it doesn’t send anything. I use wp 2.3, Unix server.
    what should I do?
    Vadim

  94. miyoshi Says:

    Livingston Samuel,

    Thanks for comment.

    Is there a way to prevent the WP-Contact form javascript file from being included in all the pages??

    No, no such a way is supported.

  95. miyoshi Says:

    Vadim,

    I installed your plugin but it hang ups when I try to send an email and it doesn’t send anything. I use wp 2.3, Unix server.
    what should I do?

    The most posiible cause is a conflict with other plugins. You should deactivate all plugins and try them one by one.

  96. Mein Blog hat nun auch ein Formular | Dieter Welzel´s Blog Says:

    [...] Contact Form 7 von Takayuki Miyoshi und [...]

  97. taro Says:

    初めまして。設定が分かりやすく素晴らしいプラグインだと思います。
    ただ、フォームを設置したページにSafariでアクセスして
    送信ぼたんをクリックすると、

    “あなたのメッセージは送信されました。ありがとうございました。”

    と表示されるはずののメッセージが

    入力内容に不備があります。確認してもう一度送信してください。

    といった具合に文字化けしてしまいます。
    その他のScriptで表示される部分も同様です。
    Nippon 2プラグインも試したのですが効果は見られませんでした。
    FirefoxやwinのIEだと文字化けしないようなのですが
    対応策があれば教えてください。

  98. mike Says:

    初めまして。
    本日インストールさせて頂いたのですが、実際にページを生成してみて、項目を入力して送信ボタンを押したところ、メールは送信されているのですが、画面上はページ遷移等はせず、送信ボタンの横で画像がぐるぐる回ったままの状態なのです。

    完了画面や確認画面は無いような仕様なのでしょうか?

    又、送信ボタンを押すとボタンの下のマージンがガクンと減るようなのですが、こちらも仕様なのでしょうか?

    機能としてすごくすばらしいのでぜひ使わせて頂きたく、コメントさせて頂きました。

    よろしくお願い致します。

  99. lillymon Says:

    Hello Miyoshi san and thank you very much for your hardwork.
    I’ve installed this plugin in my site few days ago but when I send myself a test message, I receive nothing at all even though I do get a “your message has been successfully sent” message.
    I’ve read the comments here and your instructions on how to install but didn’t find anything to help me through this problem.

    May you help, please ?

    Lillymon~

  100. miyoshi Says:

    taro さん、

    ご報告ありがとうございます。あいにく僕の手元に Mac がないのでテストができないんですが、思い当たる所があったので修正を行いました。今日リリースした 1.6.1 を試してみてください。もし直っていたらまたご連絡いただけると助かります。

  101. miyoshi Says:

    mike さん、

    正常な状態であればフォーム送信後に結果のメッセージが表示されます。何か問題が生じているようです。マージンの件もその影響です。

    JavaScript が正常に動作していない可能性が考えられます。ブラウザの設定や、何かエラーが出ていないかをまず確認されるとよいかと思います。他のブラウザで試してみるのも切り分けになります。

    他のプラグインとのコンフリクトで上の問題が引き起こされるケースも考えられるので、できればクリーンインストールした WordPress 上でテストしてみるといいと思います。

    個別環境の問題と思われるのでこれ以上のサポートはできませんが、試してみてください。

  102. miyoshi Says:

    lillymon san,

    Thanks for your comment. “your message has been successfully sent” message means “mail sending function completed successfully”. You should check 1) your mail server is working properly, 2) channel and your mail client are working properly.

    I think the most possible cause of those issues is spam filtering. Check your spam filter both on server and on client.

  103. Vladimir Says:

    Hello,
    Could you, please, add id’s to these lines:

    $html = ‘_input type=”text” id=”‘ . $name . ‘” name=”‘ . $name . ‘” value=”‘ . attribute_escape($value) . ‘”‘ . $atts . ‘ /_’;

    $html = ‘_textarea id=”‘ . $name . ‘” name=”‘ . $name . ‘”‘ . $atts . ‘_’ . $value . ‘_/textarea_’;

    $html = ‘_select id=”‘ . $name . ‘” name=”‘ . $name . ‘”‘ . $atts . ‘_’ . $html . ‘_/select_’;

    This would be really great!
    Good luck.

  104. miyoshi Says:

    Vladimir,

    I’m not sure I understand your point, but if you just want to set id= attribute to <input> elements, you can do it by using id: option within the tags. See the second example.

  105. Vladimir Says:

    Miyoshi,

    Sorry for my ignorance, and thank you for your reply!
    That’s just what I wanted.

    Good luck.

  106. lillymon Says:

    @Miyoshi san,

    “You should check
    1) your mail server is working properly
    2) channel and your mail client are working properly
    I think the most possible cause of those issues is spam filtering. Check your spam filter both on server and on client.”

    I’m using Gmail with no custom spam filters or anything of that sort so i suppose they are working fine and my test messages shouldn’t be treated as spam but i still do not receive my own test messages. =(
    I’ve double checked everything and I’m pretty sure I’ve followed your installation notes.

    Any suggestions ;_;?

  107. Jeremy Says:

    I put your contact form in my site and everything is great except that I get each email twice.

    Any idea what is happening?

    I get a few every day, so deleting the duplicate is getting tedious.

  108. miyoshi Says:

    lillymon san,

    You should check your server again. Nowadays many hosting servers have own spam filtering system.

    Do you receive other mails e.g. comment notifications from WordPress? I think this is not an issue of plugins.

  109. miyoshi Says:

    Jeremy,

    How did you customize in Mail (2) fields?

  110. Drew Says:

    Thanks, great plugin!

  111. Jeremiah Says:

    Thank you so much for developing this tool. I will probably end up using it a ton! Thank you!

  112. taro Says:

    Macでの文字化け問題ですが、
    1.6.1 にアップデートしたら無事に解決しました。
    さっそくのご対応ありがとうございます!

  113. miyoshi Says:

    taro さん、

    ご連絡ありがとうございます。こちらも安心です。

  114. glass Says:

    初めまして。
    探し求めていた個別に設置できるメールフォームが見つかり、本当にうれしいです!ありがとうござます。

    1つ質問させてください。
    入力者にタイトルを入力してもらうのを省くために、メールのタイトル(subject)部分を、ブログのタイトル(部分)にしたいと考えています。
    そういった箏は可能でしょうか?

    お忙しいところすみませんが、ご教授願えたらと思います。
    よろしくお願い致します。

  115. Sergios Says:

    Is there any way to include generated email forms within some place of template and not inside post/page?

  116. miyoshi Says:

    glass さん、

    メールの件名欄にあらかじめブログのタイトルを書いておけばいいんじゃないでしょうか。タグ以外の部分は置換の対象になりませんから自由に書き換えてください。

  117. miyoshi Says:

    Sergios,

    You can place a form in sidebar widgets (text widgets). See here. And you can embed a sidebar into any place of template.

  118. devnul Says:

    something is not working - i always get the RED error-message. as in a reply to a similar question this should be a php problem. nevertheless WP Contact Form III just works right.

    what “backend-mailer” is contactform 7 using.
    thank you

  119. 10 Ways to Secure your Wordpress Install | Hackosis Says:

    [...] the comments, but I do have captcha in place for logins with Raz-Captcha and my contact form with Contact Form 7. This keeps bots from spamming and trying to crack your login. If anyone knows of a captcha system [...]

  120. miyoshi Says:

    devnul,

    Contact Form 7 calls wp_mail(), while Contact Form III calls mail() directly. If you switch the function, it may be fixed.

  121. devnul Says:

    @miyoshi
    thank you for this information!

  122. Sergios Says:

    Well the problem actually is that the theme i built dont use widgets (and i dont want to use them) thats why i needed a simple php solution without widgets :)

  123. Dr. Hulda Clark Says:

    At first I was hesitant to use this contact form since it looked complicated, but the defaults are perfect for my humble needs. Thank you for this excellent and free plugin. You have made my life much easier.

  124. Yoyo Says:

    Hi, it doesnt work with 2.3.1, just got rid of wp_mail() and used mail() as described above and sent the mail at flash speed… thanks for this useful plugin.

  125. Sakib Al Mahmud Says:

    thanks

  126. dpSubi1 Says:

    Thanks for providing this plugin. :)

  127. Randall Says:

    Miyoshi:
    Thanks for the work on the plug-in. I’ve installed and set-up the contact page on my site. However, I’m not getting the test mails I’ve sent using the form. I’ve turned off the spam controls on both my wordpress site and my e-mail account. Still no messages go through although the contact form says they were successfully sent. Can you help?

    Randall

  128. Alex Says:

    Hi, thank you very much for the plugin but I am having a similar problem to Mohammad… it works perfectly but it has no AJAX effects… i receive all the e-mails ok though.
    here is my link:
    http://www.alexweber.info/contato/

    also, i have another plugin “wp-email” to send emails of articles and it works with ajax, link here if you want to see: http://www.alexweber.info/blog/traducao-do-wordpress/

    thank you very much and please help me make ajax work!! :)

  129. JP Says:

    Alex, you may also want to check out “cforms II” as it’ll fully support Ajax and can do what WP-Email does - just in case you can’t get contact-form-7 to work.

    I’ve been happy with contact-form-7 but will have to eventually switch because I need more flexibility.
    JP

  130. alexweber Says:

    thanks! :)
    i’ll check it out but i’d really love it if the developer could just help me make ajax work! :)

  131. Booker Says:

    Miyoshi,

    This is by far THE BEST contact plugin ever - and thank you for all of your hard work on it. The one question I do have on it, is that I get a large colored box upon mail transmitting through the form, that I would like to have contained to the message area that reads “Your message was sent successfully. Thanks.” located beneath the send button. Instead, what happens is the entire form is surrounded by the colored box upon transmission. Any suggestions to correct this would be highly appreciated, and please feel free to go to the contact form on the site, and test submission of an email to reproduce the error. All the Best, Booker!

  132. Jake Says:

    I want to format the text input so that there is enough room to type a message.. I can’t figure out where to do this. http://grapethinking.com/contact

  133. alexweber Says:

    Jake, its easy!
    On the customize contact form admin screen just add a new text-area tag and you will see that there are optional parameters like rows and columns… here’s an example:

    Subject
    [text your-subject 40/]

    Message
    [textarea* your-message 50x6]

    this creates a subject text field of size ‘40′ and a textarea field of 50 rows x 6 columns…

    look at what it looks like here:
    http://www.alexweber.info/contato

    *note i also added some custom CSS of my own but you get the idea! :)

  134. Jake Says:

    Thanks Alex! I hate to bother you further, but how did you set id’s to the form fields for CSS.

  135. alexweber Says:

    Hi Jake,
    I didn’t, all i did was manually find the PHP code where the form is generated (search for: ###$form .= ”;###) around line 540 of wp-contact-form-7.php and added a fieldset around the form. just make sure to add the opening fieldset tags before opening the DIV a couple lines up or else AJAX won’t work (don’t ask… took forever for me to figure it out) and also don’t forget to close the fieldset tags after closing the form tags… then just override the CSS for ALL fieldsets.

    but really, you could just add a class to the form in that same file and style it like that…
    if you need more detailed help drop me a line by email and i’ll help out!

    Alex

  136. alexweber Says:

    ok it edited out most of my code… but you might still be able to find it around like #540 of that php file… where the form is generated… gl

    Alex

  137. miyoshi Says:

    Sorry, I’m late …

    Thank you for comment everybody.


    Randall,

    I’ve installed and set-up the contact page on my site. However, I’m not getting the test mails I’ve sent using the form. I’ve turned off the spam controls on both my wordpress site and my e-mail account. Still no messages go through although the contact form says they were successfully sent. Can you help?

    I don’t know well about those problems, but it seems that WordPress’s current mail sending function has trouble on some environment (see trac #5007). And some Contact Form 7 users have reported that changing wp_mail() to mail() solves the problem. I’m still not sure what’s the cause.


    Alex,

    Hi, thank you very much for the plugin but I am having a similar problem to Mohammad… it works perfectly but it has no AJAX effects… i receive all the e-mails ok though.
    here is my link:
    http://www.alexweber.info/contato/

    Sorry for my late reply, but you seem to have already solved the issue by yourself :)

    And thank you very much for answering to other users questions!


    Booker,

    The one question I do have on it, is that I get a large colored box upon mail transmitting through the form, that I would like to have contained to the message area that reads “Your message was sent successfully. Thanks.” located beneath the send button. Instead, what happens is the entire form is surrounded by the colored box upon transmission.

    I saw your site and checked its HTML tree with Firebug. It seems that all the contents are under the “header” div element. Is this intended? I think you forgot to add a closing </div> tag.


    Jake,

    Thanks Alex! I hate to bother you further, but how did you set id’s to the form fields for CSS.

    You can also use id: and class: options as:

    [text your-subject id:formsubject1 class:textfield]

    This tag is replaced by:

    <input type="text" name="your-subject" id="formsubject1" class="textfield" />

    Then you can specify CSS style for these id and class.

    So far the <form> element has no id or class, but I’ll set them in next version for CSS styling.

    Thank you.

  138. alexweber Says:

    hi miyoshi thanks for the replies and good tip regarding jake’s css styling question! :)

  139. Booker Says:

    Miyoshi… in your response you said: “I saw your site and checked its HTML tree with Firebug. It seems that all the contents are under the “header” div element. Is this intended? I think you forgot to add a closing tag.” Could you specify where I should put the tag - I’m lost! Thanks, :) Booker.

  140. miyoshi Says:

    Booker,

    I think one </div> is missing before <div id="page_">. But I’m not sure. I know your site less than you :p

  141. Virtually yours, » Blog Archive » My Top 10 WordPress Plugins Says:

    [...] The Contact Form 7 plugin greatly simplifies the creation of multiple contact forms, without touching the code. Available from http://ideasilo.wordpress.com/2007/04/30/contact-form-7/. [...]

  142. Jake Says:

    Thanks Miyoshi. You and Alex have been great helps. I think just adding a default form id would work out great. The only thing would be if you change the name of the form (which I recently did), the id would probably change, and then you not only have to change the code where you want the form to show, you would also have to go back and rename your css. Regardles.. I still like the idea.

    Thanks again!

    Jake
    http://grapethinking.com

  143. Copernicus Says:

    Hello, thanks for all your work on this great plugin.
    Is there a way to REMOVE all the code within the head of pages that do NOT have the Contact Form?
    It seems strange to have all that code in the head on every page when the contact form is (often) only on one page.

    I know with other plugins, one can employ a combination of a conditional tag and a “remove_filter” call.

    Here’s a snippet from such a combination for another plugin:

  144. Copernicus Says:

    My apologies. That code snippet did not work.
    You can see an example of the “remove_filter” use on

    http://wpcal.firetree.net/faq/

    under the section:
    “Q: Can I disable your headers on pages with no calendar?”

  145. miyoshi Says:

    Copernicus,

    Good suggestion. How about this?

    <?php remove_action('wp_head', array(&$wpcf7, 'wp_head')); ?>

    Add this line into your template before wp_head() is called. You need the latest 1.7.1 of Contact Form 7 which I released just now :)

    Thank you.

  146. Jonathan Says:

    Your contact form is DA BEST Can I use help?:D How can I use drop-down menu for my customize subject?

  147. miyoshi Says:

    Jonathan,

    You can do it by adding this line into the Form text area.

    [select your-subject "Option 1" "Option 2" "Option 3"]

    Original [text your-subject] line is no longer in use, so you can remove it.

  148. Jonathan Says:

    Miyoshi,

    Thanks for your reply. I customize the design of your contact form 7 to fit in my site. Is that okay to you?

    Your contact form was great promise. I rate that 10 out of 10. Because its useful and easy to use plugins!

  149. miyoshi Says:

    Jonathan,

    Thank you!

    The plugin is published under GPL, of course you can customize it.

  150. Aurelius Says:

    すばらしいプラグインをありがとうございます。
    カスタマイズ性と使いやすさが両立されていて、
    最も優れたメールフォームだと思います。

    Contact Form 1.7.1について質問があるのですが、
    送信者のメールアドレスの入力を必須にしないため、
    メールアドレスは

    メールアドレス
    [email your-email]

    として必須の*を外し、「差出人」の欄に

    [your-name]

    と固定の送信者アドレスを入力すると、
    「入力内容に不備があります。確認してもう一度送信してください。」
    というメッセージが表示されて、送信されません。
    送信者のメールアドレスを必須とせず、フォームを利用するには
    実際にはどうすればいいでしょうか?

    それと、タグの作成でメールアドレス項目を作成すると、
    作成されるコードが”email”ではなく”text”になるのは
    バグでしょうか?

    お忙しいところすいませんがよろしくお願いします。

  151. Aurelius Says:

    として必須の*を外し、「差出人」の欄に

    [your-name] <user@domain.com>

    と固定の送信者アドレスを入力すると、

  152. Aurelius Says:

    です。上記のコメントで
    半角の<>が表示できなかったようです。

  153. Jonathan Says:

    Miyoshi,

    Man time past by I always want to have a comment form like your “contact form 7″ I love the jquery effect. Are you planning to release a comment form that has captcha and validates like contact form 7?.

    Thanks,
    Jonathan

    P.S.
    Maybe you can visit my contact form. peace!

  154. miyoshi Says:

    Aurelius さん、

    メールアドレス
    [email your-email]

    として必須の*を外し、「差出人」の欄に

    [your-name] <user@domain.com>

    と固定の送信者アドレスを入力すると、
    「入力内容に不備があります。確認してもう一度送信してください。」
    というメッセージが表示されて、送信されません。

    指摘されてはじめて気づいたんですが email でも入力カラだったらメールアドレスの構文チェックではじかれてしまうんですね。これじゃ emailemail* を区別する意味がなくなってしまいますね。これは意図してないことなので次のリリースで修正します。

    (たぶん最初のころからそうなっていたと思うんですが今までだれも指摘しなかったところを見ると email はほとんど使われてないのかな…)

    それと、タグの作成でメールアドレス項目を作成すると、
    作成されるコードが”email”ではなく”text”になるのは
    バグでしょうか?

    バグです! これも次のリリースで修正します。今週末あたりに出そうと思うのでためしてみてください。

    いろいろと助かりました。どうもありがとうございます。

  155. miyoshi Says:

    Jonathan,

    So far I have no plan to extend it to comment. I would appreciate if someone do it. I think I can help.

    btw, elegant web design yours is! I like it!

  156. Aurelius Says:

    こちらこそありがとうございました。

  157. Jonathan Says:

    Miyoshi,

    Thats great man; I want to create that comment base contact form 7. But I wish I have a skills to do that. But I try it soon if I’m not busy. I’m still reviewing your contact form 7 it was really great!, besides it has many function and its really fits may needs. Since this is an open source Can I suggest to you nor to open source developer who uses a contact form 7?

    Oh man! Thanks for your appreciation regarding to my website!

  158. miyoshi Says:

    Jonathan,

    I want to see the comment plugin based on Contact Form 7, too! It’s really an honer for an open source developer to see someone find his product useful and even make more useful derivative from it. Good luck!

  159. Paul McCarthy Says:

    Hi there,

    Thanks for a great plugin, I really appreciate the work you’ve put into this.

    I have found one problem though. I have enabled a captcha on my form. When I click on the input box to confirm the captcha focus is immediately sent to the submit button. I have to click in the input box and keep the mouse button pressed to force the cursor to stay in the box.

    This happens using Firefox 2.0.0.9 and using version 1.7.2 of your plugin. It works fine in Safari 3.0.4 (5523.