Contact Form 7 2.0 is now available. Like other 2.0 forms, Contact Form 7 2.0 includes exciting changes and enhancements. I hope you will upgrade soon and enjoy its benefits.

Download | Plugin Homepage | FAQ | Support Forum

(日本語のドキュメントは下のほうにあります。)

What has changed?

I believe people who like Contact Form 7 appreciate its simplicity above everything else. I believe every good WordPress plugin should be simple as simplicity is a virtue.

In the past, I have received many feature requests for Contact Form 7, but I have rejected most of them because I worried they would spoil its simplicity. I suppose my stubborn attitude has disappointed some people.

Contact Form 7 2.0 is still simple. It doesn’t introduce any shiny and complicated features. Instead, I have added one more virtue: extensibility.

With the new Contact Form 7, you can add your own functionality with greater ease than before. You can add your own module to it, or you can control it from your plugin.

What is a “module”?

You will find the modules folder in the plugin package. There are many files in it, such as text.php, checkbox.php, quiz.php, etc. These are all modules into which Contact Form 7’s basic features are separated.

A module includes functions which work with Contact Form 7’s core API hooks. The API hooks are very similar to WordPress’s plugin API. Thus a module works just like a “Plugin’s plugin.”

You can also make your own module and place it into the modules folder. You can use the API from another plugin as well.

A New Module: “ICL”

You will find an unfamiliar name in the modules folder, which is icl.php. This is a new feature of 2.0 which demonstrates the effectiveness of the new module API.

In the recent past, I worked with the WPML team, which is developing a WordPress plugin that allows you to make your WordPress site multilingual. ICL (ICanLocalize) is the name of their professional online translation service. They are hardworking people with great ambition.

As a result of our work together, I am now introducing the ICL module. This module allows you to make your contact form multilingual. This means you can show the English form to your English visitors and, at the same time, show the Japanese form to your Japanese visitors.

ICL is simple to use. Just wrap your text which needs translation in a form with [icl] and [/icl]. I suggest adding a name to the opening tag, such as [icl greeting]. This will make it easy to manage the translation later. You should use the same name in another place if you use the same text in the same context.

Example:

[icl greeting]Hello! Thank you for visiting my site.[/icl]

After the translation process, when a Japanese visitor browses your contact form, the page reads “こんにちは! 私のサイトを見に来てくれてありがとうございます。”, while still showing “Hello! Thank you for visiting my site” to English visitors.

The same tags can be used in the Message fields. You can show the response messages in the visitor’s language.

[icl success-response]Your message was sent successfully. Thanks.[/icl]

You can also translate the text in your form components. For example, if you want to show the country selection menu in a visitor’s language, insert the icl option into the tag like this:

[select your-country icl:country-names "China" "India" "San Marino"]

Other Important Notes

The required WordPress version with which Contact Form 7 can work changed to 2.7 and higher.

The menu for Contact Form 7 management has been moved to the top level. It was a submenu under the “Tools” menu in the past.

Contact Form 7 creates its own table in your database and saves all data in this table. Your old data in the options table migrates to the new table automatically. If you find it does not work, try re-activating the plugin.

In addition, this release includes Greek translations updated by Pr. Friedlich, traditional Chinese translations updated by James Wu, and Dutch translations updated by Martin Hein.

Thank you, everyone.


(in Japanese from here)

Contact Form 7 2.0 をリリースしました。ほかの 2.0 がそうであるように、Contact Form 7 2.0 は画期的な機能変更や改善を数多く含んでいます。ぜひこの機会にアップグレードして、そのメリットを体験してください。

何が変わった?

Contact Form 7 を気に入ってくださる方はそのシンプルさを何よりも評価してくださっていることと思います。どのようなものであれ、良い WordPress プラグインというものはシンプルなものであるはずだと信じています。

これまでにたくさんの新機能のリクエストを頂いてきましたが、そのほとんどを却下してきました。その機能を盛り込むことでシンプルさを台無しに損ねてしまうのではないかと心配したからです。頑固なので、がっかりさせたかもしれません。

それでも、Contact Form 7 2.0 はシンプルであり続けます。キラキラしてややこしいばかりの新機能を導入するつもりはありません。その代わりに、もうひとつ特長を加えます。それは拡張可能性です。

新しい Contact Form 7 はあなたが独自の機能性をそこに加えることを可能にします。独自のモジュールを追加してもいいですし、あなたのプラグインからコントロールすることだって可能です。

モジュールとは?

プラグインのパッケージを開くと modules というフォルダがあると思います。その中に text.phpcheckbox.phpquiz.php といったファイルがあります。これらがモジュールです。

モジュールは Contact Form 7 のコア API のフックと連携する関数を含んでいます。この API フックは WordPress 自体のプラグイン API とほとんど同じものです。ですからモジュールはあたかも「プラグインのプラグイン」として機能します。

独自の機能を実現するモジュールを作って modules フォルダに置いてもいいですし、他のプラグインから API を利用することも可能です。

新しいモジュール: “ICL”

modules フォルダに見慣れない名前があるのに気付いたでしょうか。icl.php は 2.0 で導入した新機能で、新しいモジュール API の有効性を実証するものです。

ここしばらくの間、私は WPML のチームと協力して開発を行っていました。彼らはサイトを他言語化する WordPress プラグインを開発しています。ICL (ICanLocalize) というのは彼らが提供しているプロ翻訳者によるオンライン翻訳サービスの名前です。彼らは非常に熱心で、また高い目標を持って活動している人々です。

共同開発の最初の成果として、この ICL モジュールを導入する運びになりました。このモジュールにより、コンタクトフォームの他言語化が可能になります。つまり、英語を使うビジターには英語のフォームを、同時に、日本語を使うビジターには日本語のフォームを見せることが可能になるのです。

使い方は簡単です。翻訳が必要なテキストを [icl][/icl] で囲みます。このとき、開始タグに [icl greeting] のように名前を付けることをお勧めします。こうすることで後々、翻訳テキストの管理が簡単になるからです。別の場所であっても、それが同じ文脈で使われる同じテキストであるなら、同じ名前を付けてください。

例:

[icl greeting]Hello! Thank you for visiting my site.[/icl]

これで、翻訳のプロセスが完了すると、日本語のビジターには “こんにちは! 私のサイトを見に来てくれてありがとうございます。” と表示するようになりますが、英語のビジターには引き続き “Hello! Thank you for visiting my site” と表示します。

同じタグがメッセージの項目内でも使えます。応答メッセージをビジターの言語で表示するには次のようにします。

[icl success-response]Your message was sent successfully. Thanks.[/icl]

また、フォームを構成するタグで使われるテキストにも翻訳を適用できます。例えば、国名を選択するメニューをビジターの言語で表示するには、次のように、タグに icl オプションを挿入します:

[select your-country icl:country-names "China" "India" "San Marino"]

そのほか重要な注意点

Contact Form 7 2.0 の使用には WordPress 2.7 以上が必要になります。

Contact Form 7 の管理メニューが従来の「ツール」メニューのサブメニューの位置から、トップレベルの「Contact Form 7」に移動しています。

Contact Form 7 独自のテーブルがデータベースに作られ、すべてのデータがそこに保存されるようになります。options テーブルの古いデータは新しいテーブルに自動的に移植されますが、もし移植されていない場合はプラグインの再有効化を試してみてください。

それから、今回のリリースには Pr. Friedlich さんによるギリシャ語翻訳の更新、James Wu さんによる繁体字中国語の翻訳の更新、それに Martin Hein さんによるオランダ語翻訳の更新が含まれています。

皆さん、どうもありがとうございます。


Comments

67 responses to “Contact Form 7 2.0”

  1. Hi,
    First of all, thank you so much for this dreamed plug-in. I use it for two different blogs (v2.8.2 EN and FR) and I upgrade it from 1.10.1 to 2.0. All contact forms were lost. I tried to create a new one. I had the confirmation of the creation, but no contact form saved. I recover all previous contact forms by reloading the previous version (1.10.1).
    Sorry to tell you this about,
    Best regards,

  2. Little bugi :(

    Fatal error: Cannot redeclare wpcf7_plugin_url() in /wp-content/plugins/contact-form-7/wp-contact-form-7.php on line 73

  3. Hi Miyoshi,

    Wicked plugin – it is used by my visitors many times a day. Thanks a million!

    However, your recent update put the settings link labelled ‘Contact Form 7’ in its own slot on the left sidebar. There’s no problem with the location, but the length of the plugin’s name means it doesn’t fit into one line, and spans across two lines of text. This makes it stand out among the otherwise neat WordPress menu items.

    Can you do a quick update and reduce the text to simply ‘Contact Form’?

    Yours,
    Tom

  4. Miyoshi, you didn’t provide upgrade instructions with this release, and so I assumed I could just upgrade in the normal way, by unzipping the contact-form-7.2.0.zip over my existing installation. That is not the case. When I did so, my existing form was lost.

    Is there some way to fix this?

  5. Failed to update? Deactivate the plugin, replace files, and activate it again. Simple.

  6. If you use WordPress automatic plugin upgrade, it does those processes for you automatically.

  7. Hi,
    And thanks for this job, once again…
    But I can’t see it in action !
    I am in 2.8.2; I have just upgraded CF7 from my admin, new files are ok, and the new table was created in my database, but without my old contact page.
    So I have re-installed the old version, copy the code of my old “contact form 1”, then uploaded again the new version, end tryed to create my form again and saved it : nothing appears, it refuses to save it… When I save, the CF7 settings page is only showing again one link, to create a new one…
    I don’t know xhat to do, so I’m back now to 1.10.1…

  8. Maître, if you have wp_contact_form_7 table on your current database, once drop the table. And deactivate Contact Form 7, upload new version, and activate it. By doing this, it creates wp_contact_form_7 table and copy your old data to it automatically.

  9. Thank you Miyoshi for you’r very quick answer, but in fact I have made a mistake : wp_contact_form_7 table has’nt been created ! (I was mistaken with another base… Sorry!)
    I already has the same problem with some Lester Chan plugins, no databases created when I install them, I think it’s because my php or sql versions are too old…
    Is it possible to you to write here the code to install it manualy in PhpMyadmin ?
    Thanks again, in any case..!

  10. I’m on WP 2.8.2, and just upgraded to WP Contact Form 7 ver. 7.2.0. I noticed a problem after the upgrade. I’ve set the text size to 30, but the text input size shows 40 instead (through view source on the web browser). This resulted in a layout mess to the contact form, and I’m unsure why this happened.
    I hope that there’s a quick solution to this ‘hiccup’. Anyway, I’m back on WP Contact Form 7 ver. 1.10.1, which I’m very happy with :-)

  11. Miyoshi,

    You have done a commendable contribution to the wordpress community. Appreciate all your efforts and thanks for the great work.

    Cheers!
    Mohan

  12. Wouarf, now it’s done, but well, it has been a real job for a zero like me..!
    The code you provided in the install file was sending an error to my PhpMyadmin, so I updated the plugin on another blog I have, more recent, and it worked : so I edit on it’s PhpMyadmin the good code for me to create the table, witch was exactly, if somedy have the same problem :

    CREATE TABLE IF NOT EXISTS `wp_contact_form_7` (
    `cf7_unit_id` bigint(20) unsigned NOT NULL auto_increment,
    `title` varchar(200) NOT NULL default ”,
    `form` text NOT NULL,
    `mail` text NOT NULL,
    `mail_2` text NOT NULL,
    `messages` text NOT NULL,
    `additional_settings` text NOT NULL,
    PRIMARY KEY (`cf7_unit_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

    And it worded !

    But of course, I had to recreate my old contact form manualy, but it’s ok now (hope it works, but it’s another problem !).

    I have only one more question : I suppose the old table, in wp_options, is still there, because of my manual works : do I have to drop it now ?

    I thank you very much again, anyway !

    I found that the french translation is too old, ther is 81 words not translated on 110 ! I will translate thme today, where can I send you the .mo and .po files (don’t worry, my english is better on translations than in comments !) ?

    Thanks again !

    Regards

  13. Jason, check this forum thread about similar issue:
    http://wordpress.org/support/topic/292425

    FYI: the size and maxwidth option for text field is working correctly on my sites. This is the code:
    [text* your-name 30/60]

  14. Mohan, you’re welcome. Thank you for your warm remarks, too.

  15. Maître,

    I have only one more question : I suppose the old table, in wp_options, is still there, because of my manual works : do I have to drop it now ?

    You don’t have to drop it. It’s not used in v2.0, but is remained for the case you wish to downgrade to v1.x.

    I found that the french translation is too old, ther is 81 words not translated on 110 ! I will translate thme today, where can I send you the .mo and .po files (don’t worry, my english is better on translations than in comments !) ?

    It’s great. Thanks. Say hello to French users.

  16. I will, they are very numerous…

    So, the french translation files are ready now, all words entirely translated, and the old translation updated too (there was some faults) : I can send thme to you if you contact me by mail…
    Or you can upload them here, in any cas (if it works ! It’s another plugin…) : http://maitremo.fr/mo-teur/telechargements/

    Thanks for all again !

  17. Maître, thank you so much! I could download the language files. The next release of Contact Form 7 will be including the translation files and your credit in README.txt.

  18. Auto-Update worked, everything seems to be ok so far :) Thank you so much for this smart plugin! modularization is great for people who dont want/need these features, instead using a slim and thus fast contact form plugin.

    keep it up!

  19. Hi Miyoshi … Thanks for providing me the forum link, and I followed the progress from there. Also, thanks for the minor bug in ver. 7.2.0, as I too used the same code as those guys who portrayed their code in that forum.

    Keep up the great work! Banzai …

  20. Thank you so much. This is a great plugin and am happy to use it!
    However, it seems not to work with gmail or googleapps. Is that right? If not, what might be the reason for me not getting emails?
    Thanks.

  21. I unlike that management moved to the top level. How I can change it?
    I will thank you if you change it in next version.

  22. Eu uso e adoro a simplicidade desse plugin. Parabéns!
    “I use and love the simplicity of this plugin. Congratulations!”

  23. Hi there, did you have any plans to add the much requested redirect to a confirmation page function?

    It would be really useful for Google Analytics tracking if that could be added. I have a 1 line hack, but that sends it to the same page for every form. What would be ideal is to have a custom page definable in each contact form set up.

    Thanks.

  24. Mr Daz, it’s not necessary to redirect for Google Analytics tracking, right? You can use on_sent_ok JavaScript hook which is already supported.

    https://ideasilo.wordpress.com/2009/05/31/contact-form-7-1-10/

  25. I added a checkbox, tried with Ratio also, but the results of the box are not on the email. See below

    [checkbox* checkbox-546 exclusive “Fan Feedback” “Store and Products” “Hire Information” “Modeling”]

    Any help Please?

  26. notjustanotherjones Avatar
    notjustanotherjones

    The plugin now ignores the length option. All of my forms are screwed up.

  27. notjustanotherjones Avatar
    notjustanotherjones

    Miyoshi,

    Also, There are people that would like to use the great functionality of your plugin on their web page, but can’t due to the lack of a “forward page” option.
    Some people would like to use the plugin for other purposes than just a contact form.

    I for, for instance, have used your forms for insurance pages for customers to fill out, 10 pages of wavers/releases, I have used it for customers to fill out multiple forms, and a few other ways that were more than just a simple contact form. Each time I have had to hack your plugin to get it to work. I think 95% of the people that use your forms are novice users and don’t have that option. It would be fitting for them to have an option to do this. Or at least make a place on your page with a list of quick javascript codes for novice users to utilize.

    Just a suggestion,

    Dan

    PS still can’t get the length in 2.0 to work correctly. It ignores length on the site I just updated. Suggestions?

  28. Try do DEACTIVATE and ACTIVATE. Should work.

  29. Would like to ad a onBlur action, how is the code and how should I add it?

    [text* name]

    thanks

  30. hi I can’t seem to get the calendar7 to work with the latest version with regards to the date been added to the email message, rather I get the [date] where it should have the actual date. Can you tell me where I can find the previous version of this plugin to download as I had this working well on that version, or is there a way I can create a calendar in the latest contact form. I did find this link on your blog however again it refers to the older version : http://wordpress.org/support/topic/285879?replies=3#post-1144956

    I tried downloading from your write up on version 1.10 however it takes me to the latest version

    Thanks

  31. I’ve been using CF7 in a WPMU installation for a few months. Unfortunately, this latest upgrade to 2.0 made it not work in WPMU. It works fine in the main blog, but does not in any sub-blogs. You can add a new form, but it does not save. Help!

  32. Hi miyoushi,
    I dont know why but, you plugin is not working for me! I have configured it properly on my wordpress 2.8.1 but I am not getting emails. When anyone tries to fill out the contact form and submit it, a 404 error page arises. Have a look yourself! http://techfreakstuff.com/contact

  33. Hey Guys

    Looks like since the upgrade my forms are submitting but never arriving to their destination. Anyone else having problems? I tried deactivating and then reactivating. I tried downgrading to v.1.10.1, now this version does not work. I even tried deactivating all other plugins thinking there was a plugin conflict. Someone please help!!! Thanks

  34. I’ve added hidden input/field capability – add hidden fields to Contact Form 7.

  35. Dear Miyoshi, It looks like a few people didn’t particularly like the placement of the CF7 at the top level in the admin menu. Will you do something about this? I think placement under Settings would be best. Thanks in advance.

  36. Zack Katz, you got the first prize! I am surprised you did it so quick! Great!

  37. @Miyoshi – Feel free to incorporate it into 2.0.1 – I don’t see any problems arising, since I just copied your code already… If you wouldn’t mind, a note on the readme to http://www.katzwebdesign.net with the anchor text “Denver SEO” would be awesome, but either way I love your plugin! cForms sucks! :-)

  38. Miyoshi, when I upgraded, the input size changed to 40 by default in the html. I have changed and reset the input size with the generator to 20, 15, and 10, all showed up with the same size as 40. Can you check and see why it’s doing so?

  39. Hello, good Plug in thanks! How can one provide a text field, with name homepage, where the left in that is sent mail with? As I can set a hook, for ” Copy for me”?

  40. Most current version of WordPress. I get the following error when installing the plugin.
    “The plugin contact-form-7/ has been deactivated due to an error: The plugin does not have a valid header.”

    Have tried everything!!! Nothing works.

  41. “The menu for Contact Form 7 management has been moved to the top level.”

    Ok, can you tell me the number of the menu, cause i want to disable it for my contributors using the wp hide dashboard menu.

    just to give you an example of numbers:
    $menu[75]: tools menu in 2.8
    $menu[25]: comments menu

    thanks

  42. Mercator Avatar
    Mercator

    Hello,

    Is there a way to use the extensions to make a form actually call a user-supplied script with the form fields added as parameter (e.g., using the POST method)?

    Thanks for the great work,
    Mercator

  43. In the Additional Settings box, you can call a function that is defined in your Functions.php file.

    That would look something like this:
    on_sent_ok: $.ajax({ type: 'POST', url: 'http://example.com/wp-content/themes/egret/functions.php',data: 'custom_data=123';}});

    Using the jQuery built-in .ajax functionality does that quite well.

  44. Ray Gulick Avatar
    Ray Gulick

    CF7 2.0 does not appear to submit with Firefox Mac. Is OK with FF Windows and Safari. Is there a bug fix on the way?

  45. continuation of my first post (see 4th post above)

    i now see that the menu for contact form 7 in the admin has NO NUMBER:

    add_action( ‘admin_menu’, ‘wpcf7_admin_add_pages’ );
    so i gave it a number:
    add_action( ‘admin_menu’, ‘wpcf7_admin_add_pages’, 9999 );

    and then tried to unset (disable) it in the admin menu using the wp hide dashboard plugin:

    unset($menu[9999]);

    unfortunately, it didn’t work.

    Can you provide a solution for this?

  46. [checkbox checkbox-newsletter "Opt-in to newsletter" default:1] is not working. As far as I got it’s the syntax for preselecting the checkbox, am I right? What happens is that the checkbox gets lost as soon as the default value is being added.

    PS, the blog is terribly slow.

  47. Jonny B Avatar
    Jonny B

    Very good plug-in. Thank you for the update.

    I have a problem with new version I hope you can help me with:

    After I installed v.2.0 the form would not display at all, so I de-activated the plug-in, re-uploaded the files and re-activated again.

    That made a difference, but I still have a problem.

    Now most of the form displays correctly – all the fields look OK except the text input for the CAPTCHA. Where this field should be, the browser displays the code instead:

    [captchar captcha-848 class:captcha]

    The CAPTCHA image field displays OK (and seems to work – the letters/numbers change when refreshing the page). So any idea what the problem is with my CAPTCHA text input?

    Here is my complete form code from the Contact Form 7 plug-in page in WP admin:

    (I hope this code displays in this comment)

    Subject:
    [text your-subject class:textfield]

    Your Message (required):
    [textarea* your-message class:textfield]

    Your Name (required):
    [text* your-name class:textfield]

    Your Band name:
    [text band-name class:textfield]

    Your Email (required):
    [email* your-email class:textfield]

    Enter letters & numbers from the image below (required):
    [captchac captcha-848 fg:#FFE900 bg:#000000 class:captchaimg]
    [captchar captcha-848 class:captcha]

    [submit class:sendbutton “Send”]

  48. For setting the above default value, one should use it before setting the label for the checkbox, e.g.
    [checkbox checkbox-newsletter default:1 "Opt-in to newsletter"]

Leave a comment