Categories
Announcement WordPress Plugins

Contact Form 7 1.7.8

Contact Form 7 / Download

I released Contact Form 7 1.7.8 after a long interval. This release includes two bug fixes and two translations update.

Apostrophe in drop down menu issue reported by majestique and locale setting of default contact form issue reported by Henrique were resolved.

Brazilian Portuguese (pt_BR) translation was updated by Henrique Vianna. Romanian (ro) translation was newly added by Stas Sushkov. Now Contact Form 7 has 18 translations. Thank you all contributors.

I’m working hard to release next version 1.8 now. It will be released in next month. It will include some new tags and features that make it more customizable.


(In Japanese from here.)

Contact Form 7 1.7.8 をリリースしました。2つのバグフィックスと2つの翻訳の更新を含みます。

majestique さんから報告のあったドロップダウンメニューの項目にアポストロフィが含まれている場合に起こる問題と、Henrique さんから報告のあったデフォルトのコンタクトフォームが正しくロケール設定されない問題が解決されました。

ブラジルのポルトガル語 (pt_BR) の翻訳が Henrique Vianna さんにより更新されました。ルーマニア語 (ro) の翻訳が Stas Sushkov さんにより新たに追加されました。これにより Contact Form 7 は18 の言語に翻訳されたことになります。貢献された皆さんに感謝します。

現在、次の Contact Form 7 1.8 のリリースに向けて開発を進めているところです。来月までにリリースする予定です。1.8 はいくつかの新しいタグとカスタマイズを容易にする新たな機能が搭載されます。

Categories
Announcement WordPress Plugins

Contact Form 7 1.7.7

Contact Form 7 / Download

I released Contact Form 7 1.7.7. This release contains new tag types for required checkboxes and drop-down menus. Checkbox* and Select* are newly introduced in this release. And Danish, Latvian and Swedish translations have been added.

New tag types: checkbox* and select*

As text*, email* and textarea* in the past, checkbox* and select* are required fields. The sender must check or select at least one meaningful option for each of these.

New translations

Contact Form 7 has now been translated into 17 languages. I’d like to genuinely thank all the translators!

Categories
WordPress Plugins

Contact Form 7 FAQ (日本語)

この投稿は更新されません。Contact Form 7 公式サイトを参照してください。


English version

  1. Contact Form 7 の管理ページはどこにありますか?
  2. 投稿の内容にコンタクトフォームを追加するにはどうすればよいですか?
  3. コンタクトフォームに項目を追加するにはどうすればよいですか?
  4. フォームにタグを追加したのにメールには何も表示されません。どうすれば追加した項目の入力内容をメールに取り込めますか?
  5. メールに [foobar] のような変なコードが入っているのですが、これは何ですか? 入れて欲しいのはユーザーの入力内容なんですが。
  6. メールの件名を指定することはできますか?
  7. 投稿内容以外の場所にコンタクトフォームを配置することはできますか?
  8. テンプレートファイルにコンタクトフォームを埋め込むことはできますか?
  9. フォームを送信すると「メッセージの送信に失敗しました」というエラーメッセージが表示されます。何が悪いのですか?
  10. 私の場合は赤いボーダーラインのエラーが出るのですが、どうすれば直せますか
  11. 「メッセージを送信しました」という緑色のボーダーラインつきのメッセージは表示されるのですが、そのメールが送られてきません。
  12. フォームの送信後、回転する矢印のアイコンは現れるのですが、それっきりで何も起きません。
  13. 一部のブラウザ上でコンタクトフォームの動作がおかしくなります。
  14. コンタクトフォームを英語ではなく自国語で使いたいのですが。
  15. CAPTCHA が機能しません。画像が表示されないのです。
  16. CAPTCHA のテキスト入力項目が Internet Explorer では動くのに、Firefox では正しく機能しません。入力項目にコードを入力できません。
  17. ファイルアップロード、ファイル添付が機能しません。
Categories
WordPress Plugins

Contact Form 7 FAQ

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


Download | Plugin Homepage | FAQ | Support Forum

(日本語の FAQ はこちら)

  1. Where is the settings page for Contact Form 7?
  2. How can I add a contact form into my post content?
  3. How can I add a field to my contact form?
  4. Nothing shows up in the email, even after adding a tag to the form! How can I include a new field’s input in the email?
  5. I get emails containing codes such as [foobar]. What’s this? I want to see the user’s input.
  6. How can I specify a subject for the email?
  7. Can I place a contact form outside a post?
  8. Can I embed a contact form into my template file?
  9. After submitting the form, I get an error message stating “Failed to send your message”. What is wrong?
  10. I get an error message with a red border. So, how can I solve this?
  11. I see a response message “Your message was sent successfully” with green border, but I never receive a mail for that.
  12. The spinning arrow icon shows up once I submit a form, but then nothing happens.
  13. My contact form behaves oddly on certain browsers.
  14. I want to use contact form in my language, not in English. How can I do that?
  15. CAPTCHA does not work; the image does not show up.
  16. CAPTCHA’s text input box is working on Internet Explorer, but not with Firefox. I cannot enter the code.
  17. File upload & file attachment do not work.
Categories
Announcement WordPress Plugins

Contact Form 7 1.7.6

Contact Form 7 / Download

Acceptance type of form tag newly added. Got more HTML-valid a bit.

New tag type: acceptance

A tag with acceptance type generates a checkbox with some JavaScript gimmick. You can use it as a test confirming if the sender has accepted specific terms.

Example

[acceptance foo] Check this if you want to send.

By default, submit buttons in the form are enabled when the acceptance checkbox is checked.

acceptance-1.png

Disabled when not checked.

acceptance-2.png

With invert option, this rule is inverted. Submit buttons are enabled when you uncheck it and disalbed when you check it.

Example

[acceptance bar invert] Uncheck this if you want to send.

You can use multiple acceptances in the same form.

acceptance-3.png

More valid

I fixed some HTML-invalid codes.

  • Add alt attribute to <img />
  • Add cols and rows attribute to <textarea>
  • Add size attribute to <input type="text" />

The last one is not for HTML-valid, it’s for users who claims default size of text input field is too small. The default size now is 40, in most of browsers it’s larger than before.

If you still have HTML-invalid codes not yet fixed, please let me know.

Categories
Announcement WordPress Plugins

Contact Form 7 1.7.5

Contact Form 7 / Download

Two fixes and one enhancement. 1) The SEO issue reported by Dexter has been fixed (I believe). 2) For wpautop() haters, hook function adding logic changed. 3) New include_blank option added to form tag of drop-down menus.

SEO issue

Dexter and some people told me that there seems be a SEO issue in Contact Form 7.

The “?wpcf7=json” code is used by Contact Form 7 only in AJAX submitting (POST) process. I wonder why Google indexed such URLs even now. Anyway, I worked around the issue.

Now Contact Form 7 doesn’t use “?wpcf7=json”, so I believe that kind of problem is fixed. But Google’s existing indexes are still there, I can’t do anything for that.

If you hate wpautop()

wpautop() is a WordPress’s built-in filter which automatically surrounds a paragraph with <p></p> tag. It’s useful and I like it, while I know some users hate it.

Some users remove the filter by commenting out a line in wp-includes/default-filters.php like below.

//add_filter('the_content', 'wpautop');

# Well, this is just an example. I don’t suggest that.

But when you are using Contact Form 7, this hack doesn’t work.

wpautop() is clever, but it doesn’t correctly treat form control elements. See this ticket. It’s a big issue for Contact Form 7. So Contact Form 7 removes original wpautop() filter, and adds patched one.

Due to this, if you want to remove wpautop() filtering, you need to hack codes in Contact Form 7 so far. It was sometimes confusing for the anti-autop hackers who didn’t know Contact Form 7 is doing such replacing.

In this release, I changed the replacing logic. Now it replaces wpautop() only if original wpautop() is registered on the filters array. So if you hate wpautop(), you can remove it by just editting wp-includes/default-filters.php.

New include_blank option for drop-down menu

If include_blank option is set, drop-down menu inserts a blank item “—” into the top of it. So this tag

[select your-menu "---" "a" "b" "c"]

and this tag

[select your-menu include_blank "a" "b" "c"]

have the same semantics.

I recommend you to use this option because it seems that some browsers don’t submit first option’s value in a menu, even if they shows the first one as selected by default. See also the HTML spec.

Categories
WordPress Plugins

Contact Form 7 tag syntax

This page explains the syntax of Contact Form 7‘s tag. If you are not familiar with basic usage of Contact Form 7, please see the plugin’s homepage.

Contact Form 7 uses “tags” for two purposes; one is for form content and the other is for mail (to, from and subject fields and message body). Tags for form content has different syntax from ones for mail.

Example of a tag used in form content:
[email* your-email 60/200 "your-email@example.com"]

Example of a tag used in mail:
[your-email]

As seen in above examples, a tag for form content generally has more complicated syntax and many options. In the rest of this page, I write mainly about the syntax and options of form content tag.

Categories
WordPress Plugins

Contact Form 7 のメッセージを日本語にする (Contact Form 7 tips)

このページは Contact Form 7 プラグインの使い方について紹介しています。

デフォルト (英語) 設定の WordPress で使った場合、Contact Form 7 はそのメッセージを英語で表示します。

Contact Form 7 の英語メッセージ表示の例

このメッセージを日本語に変えたい場合、Contact Form 7 のソースコードに変更を加える必要はありません。Contact Form 7 には日本語の言語ファイルが同梱されているので、日本語設定の WordPress で使う場合には自動的に日本語でメッセージを表示するように作られています。

Contact Form 7 の日本語メッセージ表示の例

WordPress の言語を日本語に設定するには、WordPress のディレクトリにある wp-config.php を以下のように変更します。

define ('WPLANG', '');

define ('WPLANG', 'ja');

WordPress の日本語公式サイトで配布している日本語版 WordPress をインストールされている場合ははじめから上の設定が行われていますので、特に何も手を加えることなく日本語で使用できます。

もし、日本語の表現を自分の好みに合わせて変更したいと思ったなら、Contact Form 7 の日本語言語ファイルは contact-form-7/languages/wpcf7-ja.po にあるので、このファイルを poEdit などのツールを使用して編集して使ってください。

Categories
WordPress Plugins

Contact Form 7 1.7.4 (select+ and checkbox+ removed)

I released Contact Form 7 1.7.4. You can download it from WordPress.org’s repository.

In this version, I removed two tag types, select+ and checkbox+, because they were confusing. If you have been using those tags and checkbox, you’ll be needed to edit them manually after upgrading. I’m sorry for the inconvenience.

If you are using select+ tag, replace it with select and add multiple option. Here is an example:

Before: [select+ your-menu “ウインダム” “ミクラス” “アギラ”]

After: [select your-menu multiple “ウインダム” “ミクラス” “アギラ”]

If you are using checkbox+ tag, replace it with checkbox. Here is an example:

Before: [checkbox+ your-checkbox “ウインダム” “ミクラス” “アギラ”]

After: [checkbox your-checkbox “ウインダム” “ミクラス” “アギラ”]

If you are using checkbox tag (exclusive checkbox), add exclusive option. Here is an example:

Before: [checkbox your-checkbox “ウインダム” “ミクラス” “アギラ”]

After: [checkbox your-checkbox exclusive “ウインダム” “ミクラス” “アギラ”]

Categories
WordPress Plugins

Custom layout for checkboxes and radio buttons (Contact Form 7 tips)

This is a tip for Contact Form 7 plugin.

In default, a tag of checkbox type (checkbox and checkbox+) and radio button type (radio) are rendered as inline, like

You can reverse checkbox-label order by using label-first option with those tags.

A replaced HTML source of checkbox in default case looks like below (I added line breaks for better viewing):

<span style="position: relative;">
 <span class="wpcf7-checkbox">
  <span class="wpcf7-list-item">
   <input name="your-checkbox" value="ウインダム" 
     class="exclusive" type="checkbox">&nbsp;
   <span class="wpcf7-list-item-label">ウインダム</span>
  </span>
  <span class="wpcf7-list-item">
   <input name="your-checkbox" value="ミクラス" 
     class="exclusive" type="checkbox">&nbsp;
   <span class="wpcf7-list-item-label">ミクラス</span>
  </span>
  <span class="wpcf7-list-item">
   <input name="your-checkbox" value="アギラ" 
     class="exclusive" type="checkbox">&nbsp;
   <span class="wpcf7-list-item-label">アギラ</span>
  </span>
 </span>
</span>

You can customize the layout with CSS trick.

If you want block layout instead of original inline one,

span.wpcf7-list-item { display: block; }

If you want table layout,

span.wpcf7-list-item { display: table-row; }
span.wpcf7-list-item * { display: table-cell; }

(combined with label-first option)

Notice: { display: table* } properties are not supported in Internet Explorer (even in IE7). I hate IE.