Title: Contact Form 7 Modules
Author: Zack Katz
Published: <strong>2010 年 11 月 17 日</strong>
Last modified: 2017 年 2 月 2 日

---

搜尋外掛

![](https://ps.w.org/contact-form-7-modules/assets/banner-772x250.jpg?rev=530361)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/contact-form-7-modules/assets/icon-256x256.jpg?rev=1586889)

# Contact Form 7 Modules

 由 [Zack Katz](https://profiles.wordpress.org/katzwebdesign/) 開發

[下載](https://downloads.wordpress.org/plugin/contact-form-7-modules.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/contact-form-7-modules/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/contact-form-7-modules/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/contact-form-7-modules/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/contact-form-7-modules/#developers)

 [技術支援](https://wordpress.org/support/plugin/contact-form-7-modules/)

## 外掛說明

### Add Hidden Fields to Contact Form 7

The Contact Form 7 plugin has over _1 million_ active installations, yet the great
plugin still lacks a simple feature: **hidden fields**. This plugin adds hidden 
fields to Contact Form 7 once and for all.

#### Inserting dynamic values

You can also choose to have the value of the hidden field dynamically populated 
in your form when you are contacted. To do so, choose the “Default value” to be:

 * `post_title` – Inserts the title of the post/page
 * `post_category` – The categories of the post or page
 * `post_url` – The URL of the post or page
 * `post_author` – The author of the post or page
 * `custom_field-[Name]` – The value of a post or page’s custom field. If you had
   a custom field “Foo”, you would use the following as the hidden field value: `
   custom_field-Foo`

The following values will be replaced if an user is logged in:

 * `user_name`: User Login
 * `user_id`: User ID
 * `user_email`: User Email Address
 * `user_display_name`: Display Name (Generally the first and last name of the user)
 * `user_url`: User Website

And you can also use it for user custom meta data using the format of `user-{field}`:

 * `user-aim`: AIM
 * `user-jabber`: Jabber / Google Talk
 * `user-description`: User Bio

**You can also use a filter:** hook into the `wpcf7_hidden_field_value` filter to
modify the value of the hidden field using [`add_filter()`](https://codex.wordpress.org/Function_Reference/add_filter).
If you know the ID of the input, you can also use the `wpcf7_hidden_field_value_[#
ID]` filter.

Now, when someone contacts you using your Contact Form 7 contact form, you can have
lots more information about their visit – and you’ll see it when you receive the
email that tells you you’ve been contacted.

### Easily Send All Submitted Fields At Once

#### Save time setting up your form emails…and never miss a field!

One of the limitations of Contact Form 7 is that you need to manually add each field
to generated emails. This means that if you update the form with a new field and
forget to add it to your email message, you won’t receive it in your email. **No
longer.**.

Using the **Send All Fields** module, you simply need to add `[all-fields]` to your
message, and you will receive every field submitted. If you use HTML formatting,
the formatting even looks nice.

#### Visit the official 󠀁[Contact Form 7 Modules plugin page](https://katz.co/contact-form-7-hidden-fields/)󠁿 for more support & additional information

## 螢幕擷圖

 * [[
 * The Hidden fields tag generator
 * [[
 * The `[all-fields]` Mail tag

## 安裝方式

 1. Upload plugin files to your plugins folder, or install using WordPress’ built-in
    Add New Plugin installer
 2. Activate the plugin
 3. Edit a form in Contact Form 7
 4. Choose “Hidden field” from the Generate Tag dropdown
 5. Follow the instructions on the page

## 常見問題集

  Installation Instructions

 1. Upload plugin files to your plugins folder, or install using WordPress’ built-in
    Add New Plugin installer
 2. Activate the plugin
 3. Edit a form in Contact Form 7
 4. Choose “Hidden field” from the Generate Tag dropdown
 5. Follow the instructions on the page

  How do I turn off formatting the key in the `[all-fields]` output?

Add the following to your theme’s `functions.php` file:

    ```
    add_filter('wpcf7_send_all_fields_format_key', '__return_false');
    ```

  How do I set non-standard user data as hidden field values?

Starting with Version 1.4, you can access user data, including meta data.

You need to set the default value as: `user-{meta_key}` where `{meta_key}` is the
key of the meta field you want the value of.

To get the values of WordPress default profile fields, for example, you would use:

 * `user-aim` – AOL
 * `user-jabber` – Jabber / Google Talk
 * `user-description` – Biographical description

  What is the plugin license?

 * This plugin is released under a GPL license.

  How do I send empty values with the `[all-fields]` shortcode?

Add this to your `functions.php` file: `add_filter('wpcf7_send_all_fields_send_empty_fields','
__return_true');`

  How do I modify the output of the `[all-fields]` shortcode?

 * `wpcf7_send_all_fields_format_before` – Before the loop of fields (`<dl>` for
   HTML output)
    - `$value` _string_ Previous output
    - `$format` _string_ Either “html” or “text”
 * `wpcf7_send_all_fields_format_item` – Change each item output. Passes four arguments:
    - `$value` _string_ Previous output
    - `$k` _string_ Field label
    - `$v` _string_ Value of the field
    - `$format` _string_ Either “html” or “text”
 * `wpcf7_send_all_fields_format_after` – After the loop of fields (`</dl>` for 
   HTML output). Passes two arguments:
    - `$value` _string_ Previous output
    - `$format` _string_ Either “html” or “text”

## 使用者評論

![](https://secure.gravatar.com/avatar/0df54330eb38126db80a0ce8142b8fa7b4c4b548bb796ed2f138c8ff2c83513e?
s=60&d=retro&r=g)

### 󠀁[post_date not showing correct date and time](https://wordpress.org/support/topic/post_date-not-showing-correct-date-and-time/)󠁿

 [majidmad](https://profiles.wordpress.org/majidmad/) 2019 年 6 月 26 日

As my title explains clearly, post_date tag is not working. It sends the same date
and time (incorrect date and time) for all inputs.

![](https://secure.gravatar.com/avatar/2f9acaff8278f20dc5844d553d4b6bcd54980c0c3436e2c44cd598d4707303a6?
s=60&d=retro&r=g)

### 󠀁[Works perfectly!](https://wordpress.org/support/topic/works-perfectly-1404/)󠁿

 [berniegp](https://profiles.wordpress.org/berniegp/) 2018 年 6 月 6 日

A huge timesaver for big forms!

![](https://secure.gravatar.com/avatar/d8ebb08683a854e56318b06b3c7be36769f8190db58fdcaadaae1b87e432b172?
s=60&d=retro&r=g)

### 󠀁[Works well but Mail Field syntax Error found](https://wordpress.org/support/topic/works-well-but-mail-field-syntax-error-found/)󠁿

 [yaksjain](https://profiles.wordpress.org/yaksjain/) 2017 年 8 月 22 日

Hey there, Lovely plugin this is! Just a small tweak will make it the best, Created
this tag – [hidden hidden-122 “user_email”] Which displays in mail with [hidden-
122] tag How do i use that [hidden-122] tag as a mail recipient I also tried ([hidden-
122]) Help me out here .

![](https://secure.gravatar.com/avatar/82fb4d39ba4823dd02d4f1433b802cc0ab3587aef33e6e580cd15d62b9db9787?
s=60&d=retro&r=g)

### 󠀁[Two Things To Improve](https://wordpress.org/support/topic/two-things-to-improve-2/)󠁿

 [Marco Floriano](https://profiles.wordpress.org/marcofloriano/) 2016 年 10 月 26
日 1 則留言

First of all, great idea (and plugin). But two points to improve, imo: 1 – Should
be core to contact form 7. 2 – Must install and keep installed two plugins in order
to use one. Anyway good job guys, really!

![](https://secure.gravatar.com/avatar/f2949e1420c186ba7fe9eafb8f5c406b6b29ddebb639e7c7da6f93d39b784643?
s=60&d=retro&r=g)

### 󠀁[Very helpful](https://wordpress.org/support/topic/very-helpful-137/)󠁿

 [Martin Sauter](https://profiles.wordpress.org/martinsauter/) 2016 年 9 月 22 日
1 則留言

Should be merged into the Contact Form 7 plug-in.

![](https://secure.gravatar.com/avatar/4ef1925a9383ea3bfe418a099a55cc1427692d27187c68a28c605ca032e23021?
s=60&d=retro&r=g)

### 󠀁[Worked great. Huge timesaver.](https://wordpress.org/support/topic/worked-great-huge-timesaver/)󠁿

 [mrwebslinger](https://profiles.wordpress.org/mrwebslinger/) 2016 年 9 月 3 日 
1 則留言

Just installed and it works great.

 [ 閱讀全部 22 則使用者評論 ](https://wordpress.org/support/plugin/contact-form-7-modules/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Contact Form 7 Modules〉的開發相關工作。

參與者

 *   [ Zack Katz ](https://profiles.wordpress.org/katzwebdesign/)
 *   [ Zack Katz ](https://profiles.wordpress.org/katzwebservices/)

〈Contact Form 7 Modules〉外掛目前已有 1 個本地化語言版本。 感謝[全部譯者](https://translate.wordpress.org/projects/wp-plugins/contact-form-7-modules/contributors)
為這個外掛做出的貢獻。

[將〈Contact Form 7 Modules〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/contact-form-7-modules)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/contact-form-7-modules/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/contact-form-7-modules/)，或
透過 [RSS](https://plugins.trac.wordpress.org/log/contact-form-7-modules/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/contact-form-7-modules/)。

## 變更記錄

#### 2.0.1 & 2.0.2 on February 1, 2017

 * Confirmed compatibility with WordPress 4.7.2
 * Updated to work with Contact Form 7 4.6
    - Fixed: `[hidden]` shortcodes not being replaced in emails
    - Fixed: PHP warning related to deprecated function
 * Fixed: Removed use of deprecated `get_currentuserinfo()` function
 * Updated translations

#### 2.0 on June 28, 2015

 * **Requires Contact Form 7 4.2 or higher**
 * Updated to work with latest Contact Form 7
 * Removed Contact Form 7 Newsletter plugin promotion

#### 1.4.2 on March 25, 2014

 * Added: `[all-fields]` shortcode now skips sending data for empty fields
    - Added `wpcf7_send_all_fields_send_empty_fields` filter to override the setting.
      See the FAQ.
 * Added: `[all-fields]` shortcode output filters (see the FAQ item “How do I modify
   the output…”)
    - `wpcf7_send_all_fields_format_before`
    - `wpcf7_send_all_fields_format_item`
    - `wpcf7_send_all_fields_format_after`

#### 1.4 & 1.4.1 on March 15, 2014

 * Added: Internationalization support. [Help translate the plugin!](https://www.transifex.com/projects/p/contact-form-7-modules/)

**The below updates apply only to the Hidden Fields module.**

 * Added: Support for retrieving other user data by using the field name `user_{
   data you want}`. See the FAQ “How do I set non-standard user data as hidden field
   values?”
 * Added: `wpcf7_hidden_field_implode_glue` filter. If you want to modify how arrays
   of data get combined into a string (default is CSV), use this filter.
 * Fixed: `$post` global no longer needs to be defined for user data to be successfully
   passed.
 * Fixed: Now supports multiple post `custom_field` data values, instead of only
   fetching one
 * Modified: Added callback function to format the hidden field instead of relying
   on depricated PHP
 * Modified: Improved include path for `functions.php` file
 * Modified: Added text to support additional localization

#### 1.3.3

 * Hidden Fields: Fixed issue that broke the plugin with WordPress 3.8.

#### 1.3.2

 * Hidden Fields: Fixed PHP notice caused by improper adding of script in administration
 * Hidden Fields: Fixed double inputs that were the exact same ([as reported here](https://wordpress.org/support/topic/render-the-fields-twice))

#### 1.3.1

 * Fixed: issue in Hidden Fields where the `[hidden-###]` shortcode no longer worked
   and only `[post_title]` format worked.
    - Added: Hidden fields now support both formats: `[hidden-123]` and `[post_title]`
      as long as they’re in the form itself.
 * Fixed: issue in Send All Fields where the [HTML was showing as text](https://wordpress.org/support/topic/post_title-hidden-field-no-longer-working#post-3708463).
 * Added `wpcf7_send_all_fields_format_key` filter to Send All Fields plugin to 
   turn on or off formatting of the key (replacing `example-key` with `Example Key`
   in output). See “How do I turn off formatting the key in the `[all-fields]` output?”
   in the FAQ.

#### 1.3

 * Fixed: Hidden field now supports new Contact Form 7 format; post fields will 
   work again.
 * Fixed: Send All Fields no longer causes spinning form submission in WordPress
   3.5
 * Added: access any of the [data in `$post` object](http://www.rlmseo.com/blog/wordpress-post-variable-quick-reference/)
   by using the variable name. Example: You want `post_modified`? Use `[hidden hidden-
   123 "post_modified"]`
 * Added: If an user is logged in, you can now use `user_name`, `user_id`, `user_email`,`
   user_display_name` replacement values
 * Added/Improved: `post_author` will now return the author’s Display Name. Use `
   post_author_id` for the post author’s ID.
 * Added: Inline instructions on the Hidden field module
 * Improved: In Send All Fields, the name of the field now has dashes replaced with
   spaces. This will show “your name”, rather than “your-name”. Thanks, [@hitolonen](https://wordpress.org/support/topic/sending-all-fields-with-content-code-provided)

#### 1.2.2

 * Removed `_wpnonce` field from `[all-fields]` output
 * Fixed a conflict when using “Send All Fields” module alongside “Hidden Fields”
   module ([as reported here](https://wordpress.org/support/topic/plugin-contact-form-7-modules-all-fields-doesn´t-work-wit-wordpress-33))

#### 1.2.1

 * Added support for checkboxes with Send All Fields (`[all-fields]`)

#### 1.2

 * Hidden fields are now displayed inside a hidden `<div>` instead of Contact Form
   7’s default `<p>`. This makes hidden fields more hidden 🙂
 * Added brand-new module: Send All Fields. Allows you to add a `[all-fields]` tag
   to your email message that includes every submitted field in one tag.

#### 1.1.1

 * Fixed `Parameter 1 to wpcf7_add_tag_generator_hidden() expected to be a reference,
   value given` error, [ as reported by BDN Online](http://www.seodenver.com/contact-form-7-hidden-fields/#comment-116384456)

#### 1.1

 * Added support for using post titles as hidden fields
 * Added support for using custom field values as hidden fields
 * Added `wpcf7_hidden_field_value` filter to hook into using [`add_filter()`](https://codex.wordpress.org/Function_Reference/add_filter)

#### 1.0

 * Initial plugin release.

## 中繼資料

 *  版本 **2.0.2**
 *  最後更新 **9 年前**
 *  啟用安裝數 **5,000+**
 *  WordPress 版本需求 ** 2.8 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.7.33**
 *  語言
 * [English (US)](https://wordpress.org/plugins/contact-form-7-modules/) 及 [German](https://de.wordpress.org/plugins/contact-form-7-modules/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/contact-form-7-modules)
 * 標籤:
 * [all fields](https://tw.wordpress.org/plugins/tags/all-fields/)[cf7](https://tw.wordpress.org/plugins/tags/cf7/)
   [contact form 7](https://tw.wordpress.org/plugins/tags/contact-form-7/)[Contact Forms 7](https://tw.wordpress.org/plugins/tags/contact-forms-7/)
   [hidden fields](https://tw.wordpress.org/plugins/tags/hidden-fields/)
 *  [進階檢視](https://tw.wordpress.org/plugins/contact-form-7-modules/advanced/)

## 評分

 3.7 星，滿分為 5 星

 *  [  15 個 5 星使用者評論     ](https://wordpress.org/support/plugin/contact-form-7-modules/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/contact-form-7-modules/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/contact-form-7-modules/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/contact-form-7-modules/reviews/?filter=2)
 *  [  7 個 1 星使用者評論     ](https://wordpress.org/support/plugin/contact-form-7-modules/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/contact-form-7-modules/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/contact-form-7-modules/reviews/)

## 參與者

 *   [ Zack Katz ](https://profiles.wordpress.org/katzwebdesign/)
 *   [ Zack Katz ](https://profiles.wordpress.org/katzwebservices/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/contact-form-7-modules/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://katz.co/contact-form-7-hidden-fields/)