Categories
Announcement WordPress Plugins

Contact Form 7 1.9.2

Contact Form 7 1.9.2 is now available. This version includes a new type of tag for customizable quiz fields. This new version also contains stylesheets for languages that are written in right-to-left.

Quiz Tag

In order to distinguish a form submission by a computer program versus one from a human, and also to block them, you’ve been able to use CAPTCHAs in the past with Contact Form 7. However, CAPTCHAs are hard to use in some cases. Some people have difficulty in answering CAPCHA, or simply dislike answering them. Managing CAPTCHA needs graphic libraries installed on the server, which are not always provided.

In some cases, a simpler approach is more suitable. With the new quiz tag, you can do it by using question/answer testing with simple text that you have the flexibility to create.

For example, when you insert this tag into your form:

The content before the pipe (‘|’) character (The capital of Japan?) will be used as the question. The content after the pipe (Tokyo) will be used as the expected answer.

quiz sample

If your senders prefer math, change the tag to look something like:

You can use any question and answer.

To submit the form, the sender has to input the correct answer.

When you put multiple question/answer pairs in a tag, one of the pairs will be selected at random.

In the tag generator for the quiz tag, make sure to enter one pair per line.

tag generator for quiz screenshot

RTL Language Support for Stylesheet

Most languages are written to be read in left-to-right (LTR) format. Some languages are written in right-to-left (RTL) direction, like Persian and Arabic. The stylesheet of Contact Form 7 wasn’t initially developed considering RTL languages, so it has failed to display correctly in those environments.

RTL support for stylesheets is now implemented and based on the code Mohammad Musavi kindly sent to me. If you are working in an RTL language environment, please send me feedback on whether or not it is working correctly; I’m not familiar with RTL languages and couldn’t test it thoroughly.

Translation Updates

New addition:

  • Vietnamese (vi) – Thanh Hải, Hà

Thank you!

Categories
WordPress Plugins

Check your site before reporting trouble, please!

I have been getting feedback from many Contact Form 7 users everyday. It gives me great pleasure to hear the voices of the users.

Some of what I hear, however, are reports of trouble. These resports are helpful to me in detecting bugs in the plugin, or to give me suggestions for enhancements to the plugin and documentation of it.

However, most of the recent reports of trouble that I have been getting are not with Contact Form 7. I find that most of the problems are caused by other issues, in particular, their invalid HTML structure, or conflicts with JavaScript which is loaded improperly by other plugins or themes.

In such cases, I can do nothing but tell them, “You should check your site and correct errors in it. This issue is actually caused by other plugins or theme you are using, and not a trouble of Contact Form 7” But even when I make that clear to them, some of them keep claiming that there is a bug in Contact Form 7.

So I ask you users, before reporting trouble to me, please check your site on your own first:

Check your site with HTML validators and correct errors. Contact Form 7, as well as many other plugins, uses JavaScript to manipulate DOM objects represented by HTML. So if your HTML structure is not valid, the JavaScript can’t work correctly, of course.

There are many HTML validators, but I always recommend XHTML-CSS Validator as it has a cool appearance and is easy to use.

Even if HTML is okay, JavaScript conflicts between plugins or themes can cause errors. If you use Firefox (I highly recommend Firefox if you develop web sites), you can use the excellent Firebug to check JavaScript errors.

This is the trouble pattern I see these days most often. Some plugins and themes try to load JavaScript files in an improper way. And this results in the loading the same JavaScript files multiple times, and causes conflicts.

Open the HTML source of your problematic page and check it out. Do you find jquery.js in two or more places? If so, contact the developer of the plugin or theme which loaded the JavaScript, and ask him or her to look at this Codex page and fix the issue by using wp_enqueue_script(), instead of loading JavaScript in its own way.

Unfortunately, I don’t have enough time to answer all the reports of trouble or the support requests individually, so I won’t respond to them any more if you have not followed the steps above and checked your own site first.

If you have trouble but you don’t have the skills to check your site, and don’t know how to fix the problem, please submit your issue to the support forum with the URL of the site where the issue exists. Someone will check it the problem for you and help you fix it.

Categories
Announcement WordPress Plugins

Contact Form 7 1.9.1

Happy New Year! I have just released Contact Form 7 1.9.1 and this version includes support of pipe notation, little bug fixes and translation updates.

Pipe Support

Imagine that you are a webmaster of a company and you need a contact form on your site which will allow the sender to select an email recipient. Let’s say that the options are the CEO of the company (ceo@example.com), the sales department (sales@example.com) and the support department (support@example.com).

You’ve been able to achieve this in the past with Contact Form 7 in this way: first, make a drop-down menu or radio button for the selection (you can do this by inserting a form tag such as:

[select recipient "ceo@example.com" "sales@example.com" "support@example.com"]

into the form template); second, enter a corresponding mail tag ‘[recipient]‘ into the ‘To:‘ field. This ensures that the email is sent to the specific address that the sender selected.

However, there has been a problem with this. By using this procedure, the email addresses are revealed over the Internet and this is not good. These addresses could then become targets of evil spammers very quickly.

So, what you need is a way to allow senders to select from closed data safely. The pipe (‘|’) support is just for this very purpose.

Change the form tag of drop-down menu to:

[select recipient "CEO|ceo@example.com" "Sales|sales@example.com" "Support|support@example.com"]

If you insert a pipe (‘|’) character in the middle of the option value, only the part before the pipe will be open to the outside, and the part after the pipe will be used for mail replacement.

Pipe sample image

You can use this pipe only in the drop-down menu values, radio buttons or checkboxes. If you don’t like this feature, you may define the constant WPCF7_USE_PIPE as false to disable it.

Translation Updates

New additions:

Updated:

Thank you very much!

Categories
WordPress Plugins WordPress Tips

File uploading and attachment with Contact Form 7

In this post, I will explain the file uploading and attachment feature introduced in Contact Form 7 1.9. If you are not familiar with Contact Form 7, please read the plugin homepage and FAQ first.

Summary

With this feature, you can allow your visitors to upload their files via your form, and then an email with attachments of the files is sent to you.

Please note that this feature uses the API of WordPress 2.7. So, in order to use it, you will need to upgrade your WordPress if you are using WordPress 2.6.x or older.

To set up, two steps are needed: 1) Add file uploading fields in your form, 2) Set up your mail settings to attach the uploaded files. The two steps will be explained in the rest of this post.

Adding file uploading fields in your form

Like other types of form fields, you add a tag code into the Form area in the Contact Form 7 admin panel (Tools > Contact Form 7 in WordPress 2.7).

The tag of file upload feild is like this:

[file your-file]

As with other types of tags, ‘file’ means the type of tag, and ‘your-file’ means the name of the tag.

You can use several options with ‘file’ typed tags. To limit the max file size, use the ‘limit:’ option like this:

[file your-file limit:100000]

The unit of the digits is ‘byte.’ So ‘limit: 100000’ means that the limited max file size is approximately 100 kB.

To limit acceptable file types, use ‘filetypes’ option like this:

[file your-file filetypes:gif|png|jpg|jpeg]

List the file extensions after ‘filetypes,’ and separate them with ‘|’
(pipe) character when you set multiple file types.

You can also generate these tags with the Tag Generator, of course.

Tag generator for file

Set up file attachments with a mail

For file attachments, the new field File attachments is added in the Mail field set in the Contact Form 7 admin panel. To attach the uploaded files to the mail, put tags into this field as shown below.

File attachments:
[your-file]

As other tags used in the Mail field set, only the name (in this case, ‘your-file’) is needed. Don’t put the tag’s type or options.

file attachment to mail

If you have multiple files uploaded and want to attach them into an email, simply line them up like this:

File attachments:
[your-file][your-another-file]


Categories
Announcement WordPress Plugins

Contact Form 7 1.9

Contact Form 7 1.9 is now available!

Required WordPress version changed

New required version is WordPress 2.5 or greater. This change is needed because Contact Form 7 1.9 uses the Shortcode API which is introduced in WordPress 2.5. Using the Shortcode API allows you to redece the possibility of conflicts with other plugins.

New admin panel design compatible with WordPress 2.7

In WordPress 2.7, you can find the admin panel of Contact Form 7 under the Tools menu. Basic usage has not been changed, but it has been improved to be comparable with the new elegant admin interface of WordPress 2.7.

Contact Form 7 new admin panel

File uploading and attachment support

To explain this new feature in detail, I will need an extra post. Briefly, however, you can allow your visitors to upload their files, and then an email with an attachment of that file is sent to you. To use this feature, you need WordPress 2.7 or greater.

HTML mail support

This allows you to receive HTML formatted mail with text/html content type. If you need HTML mail, simply check the “Use HTML content type” option in the Mail fields, and then write in the Message Body text area with HTML tags.

Arabic translation

Arabic translation has been newly added. Quite amazingly, two people from other countries sent me this add-in within a very short period of time. To respect them fairly and equally, I’ll publish this, giving credit to both: Tarek Chaaban and Muhammed Lardi. Thank you very much.


Categories
Announcement WordPress Plugins

Contact Form 7 1.8.1.1

Contact Form 7 1.8.1.1 has been released. It’s including Hebrew translation by Yaron Ofer and Ukrainian translation by Andrey Kovba.

Contact Form 7 1.8.1

Contact Form 7 1.8.1.1 をリリースしています。Yaron Ofer さんのヘブライ語の言語ファイルと Andrey Kovba さんのウクライナ語の言語ファイルをパッケージに追加しています。

Categories
Announcement WordPress Plugins

Contact Form 7 1.8.1

Contact Form 7 1.8.1 is now available.

This version is compatible with the new admin interface of WordPress 2.7, so if you are trying the beta release of WordPress 2.7, I recommend you update soon to get the full benefit. WordPress 2.7 has introduced a new admin menu structure, and you can find the Contact Form 7 sub-menu under the Tools menu.

Other improvements:

  • Editable messages

    Now you can edit response messages exactly as you like. Find the Messages section at the bottom of the contact form setting page. You can also set messages per contact form unit.

  • Editable messages screenshot

  • New tag [wpcf7.remote_ip]

    If you want to know where the message has been sent from, you can use the newly introduced [wpcf7.remote_ip] tag. Put this special tag in your mail template (generally in the mail body), and it will be replaced by the sender’s client IP address. Please note, however, this can only be used in mail templates and not in forms.

  • Albanian translation

    Albanian translation by Olgi Zenullari has been added. This means that Contact Form 7 has now been translated into 29 languages.

Categories
Announcement WordPress Plugins

Contact Form 7 1.8.0.4

I released Contact Form 7 1.8.0.4. This update includes a few bug fixes and four newly added translations.

Thank you so much!

My developing of Contact Form 7 1.8.1 is late. I’m planning to release it in the beginning of next month.


Testing PollDaddy. Give it a try!


(Japanese)

Contact Form 7 1.8.0.4 をリリースしました。いくつかのバグフィックスに加え、インドネシア語、ギリシャ語、ペルシャ語、スロベニア語の各言語ファイルが新たに追加されています。

Contact Form 7 1.8.1 の開発が遅れています。来月の上旬までにはリリースする予定です。

Categories
Announcement WordPress Plugins

Contact Form 7 1.8.0.3

I released Contact Form 7 1.8.0.3. This update includes Hindi translation by Tarun Joshi and Portuguese translation by Hugo Baeta. Thank you very much!


Contact Form 7 1.8.0.3 をリリースしました。今回のアップデートは Tarun Joshi さんによるヒンディー語と Hugo Baeta さんによるポルトガル語の言語ファイルを新たに追加しています。お二人に感謝!

Categories
WordPress Plugins

FAQ for Contact Form 7 1.8

I answer two questions that I receive often since Contact Form 7 1.8 was released.

1) If you get errors like this:

Warning: imagettftext() [function.imagettftext]: Could not read font in /…/wp-content/plugins/contact-form-7/captcha/captcha.php on line 61

That’s probably the same as James reported before.

The problem is because of the FTP method used to transfer the new files being ASCII when it should be auto to cover the included font files that are binary. (I think that’s right!)

To solve the problem I downloaded the original ZIP file myself and FTP uploaded the font files to wp-content/plugins/contact-form-7/captcha/gentium/.

This issue is already mentioned in WordPress Trac ticket #7568, so anticipated to be fixed in the future version of WordPress.

2) If the CAPTCHA doesn’t show up after upgrading to 1.8.x, please make sure wp-contents/uploads/wpcf7_captcha folder exists and is writable. Since Contact Form 7 1.8, CAPTCHA images are placed in that folder.


(以下、日本語)

Contact Form 7 1.8 リリース以降に頻繁に寄せられている質問に回答します。

1) 以下のようなエラーが出ている場合は、

Warning: imagettftext() [function.imagettftext]: Could not read font in /…/wp-content/plugins/contact-form-7/captcha/captcha.php on line 61

プラグインの自動アップグレードの際にフォントファイルがテキストモードで転送されてしまっていることが原因ですので(この問題は WordPress 本体の問題ですでに WordPress Trac ticket #7568 にて報告されています)、wp-content/plugins/contact-form-7/captcha/gentium/ 以下にあるフォントファイルを FTP で(バイナリモードで!)再度転送すると直ります。

2) 1.8.x にアップグレード後、CAPTCHA が表示されなくなったという場合は、wp-contents/uploads/wpcf7_captcha が書き込み可能になっているか確認してみてください。Contact Form 7 1.8 からそこに CAPTCHA の画像を置くようになっています。