Title: Masks Form Fields
Author: Petermann
Published: <strong>2016 年 11 月 8 日</strong>
Last modified: 2026 年 5 月 23 日

---

搜尋外掛

![](https://ps.w.org/masks-form-fields/assets/banner-772x250.png?rev=1530096)

![](https://ps.w.org/masks-form-fields/assets/icon-256x256.png?rev=1530096)

# Masks Form Fields

 由 [Petermann](https://profiles.wordpress.org/ivanpetermann/) 開發

[下載](https://downloads.wordpress.org/plugin/masks-form-fields.1.12.4.zip)

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

 [技術支援](https://wordpress.org/support/plugin/masks-form-fields/)

## 外掛說明

Add a class in the form field.

Example of use with [Contact Form 7](https://wordpress.org/plugins/contact-form-7/):

    ```
    [tel your-phone class:phone placeholder "Phone"]
    ```

Listing of classes available for use.

    ```
    ('span.start, input.start').mff_mask('00/0000');
    ('span.date, input.date').mff_mask('00/00/0000');
    ('span.time, input.time').mff_mask('00:00:00');
    ('span.time2, input.time2').mff_mask('00:00');
    ('input.date_time').mff_mask('00/00/0000 00:00:00');
    ('input.date_time2').mff_mask('00/00/0000 00:00');
    ('input.cep').mff_mask('00000-000', { clearIfNotMatch: true });
    ('input.zip').mff_mask('00000');
    ('input.phone, input[name="phonebr"]').mff_mask(PhoneMaskBehavior, nonoOptions);
    ('input.phone_us').mff_mask('(000) 000-0000');
    ('input.taxid').mff_mask('00-0000000');
    ('input.ssn').mff_mask('000-00-0000');
    ('input.mixed').mff_mask('AAA 000-S0S');
    ('input.cpf').mff_mask('000.000.000-00', { reverse: true, clearIfNotMatch: true });
    ('input.cnpj').mff_mask('00.000.000/0000-00', { reverse: true, clearIfNotMatch: true });
    ('input.money').mff_mask('000.000.000.000.000,00', { reverse: true });
    ('input.money2').mff_mask('#.##0,00', { reverse: true });
    ('input.money3').mff_mask('#,##0.00', { reverse: true });
    ('input.money4').mff_mask('000,000,000,000,000.00', { reverse: true });
    ('input.money5').mff_mask('#.##0', { reverse: true });
    ('input.money6').mff_mask('#,##0', { reverse: true });
    ('input.ip_address').mff_mask('099.099.099.099');
    ('input.percent').mff_mask('##0,00%', { reverse: true });
    ('input.percent2').mff_mask('##0.00%', { reverse: true });
    ('input.percent3').mff_mask('990,0%', { reverse: true });
    ('input.percent4').mff_mask('990.0%', { reverse: true });
    ('input.percent5').mff_mask('#,##0%', { reverse: true });
    ('input.percent6').mff_mask('#.##0%', { reverse: true });
    ```

[Click here](https://gist.github.com/petermann/fd1a898e02ca91a0d7231a9f8ee662b4)
for more details on how to add custom mask.

**Optional**
 – Added option for the format of the Brazilian phone number, with 
attribute `name` equal to `phonebr`.

### Credits

[jQuery Mask Plugin](https://github.com/igorescobar/jQuery-Mask-Plugin)

## 安裝方式

Installing “Masks Form Fields” can be done either by searching for “Masks Form Fields”
via the “Plugins > Add New” screen in your WordPress dashboard, or by using the 
following steps:

 1. Download the plugin via WordPress.org
 2. Upload the ZIP file through the ‘Plugins > Add New > Upload’ screen in your WordPress
    dashboard
 3. Activate the plugin through the ‘Plugins’ menu in WordPress

## 常見問題集

### What is the plugin for?

This plugin to add masks in the form’s fields.

### How to add custom mask?

[Click here](https://gist.github.com/petermann/fd1a898e02ca91a0d7231a9f8ee662b4)
for more details on how to add custom mask.

## 使用者評論

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

### 󠀁[Simple et fonctionne parfaitement !](https://wordpress.org/support/topic/simple-et-fonctionne-parfaitement/)󠁿

 [Francks](https://profiles.wordpress.org/franck-awo/) 2024 年 1 月 27 日

Merci pour ce plugin. Top ! Pour les bricoleurs comme moi, pensez à ajouter la balise
<?php au début de votre fichier /wp-content/themes/YOUR-THEME/functions.php 😉

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

### 󠀁[Good plugin](https://wordpress.org/support/topic/good-plugin-6724/)󠁿

 [mirazhyk](https://profiles.wordpress.org/mirazhyk/) 2024 年 1 月 24 日

Good plugin and very quickly support) I’m like

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

### 󠀁[It worked](https://wordpress.org/support/topic/it-worked-85/)󠁿

 [daprop](https://profiles.wordpress.org/daprop/) 2023 年 9 月 5 日

The only working plugin, with quality support

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

### 󠀁[Very nice!](https://wordpress.org/support/topic/very-nice-1821/)󠁿

 [dimmone](https://profiles.wordpress.org/dimmone/) 2022 年 10 月 14 日

Works good with cf7. Thank you! It would be great to be able to see the fields to
fill out. Like placeholder but visible all the time.

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

### 󠀁[Its works](https://wordpress.org/support/topic/its-works-30/)󠁿

 [Marcos Nakamine](https://profiles.wordpress.org/marcosnakamine/) 2022 年 8 月 
2 日

WP 6.0.1 CF7 5.6.1

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

### 󠀁[Funciona!](https://wordpress.org/support/topic/funciona-84/)󠁿

 [Fabio Moraes](https://profiles.wordpress.org/fabiomoraes/) 2022 年 5 月 26 日

Ate que enfim um plugin que realmente funciona!

 [ 閱讀全部 23 則使用者評論 ](https://wordpress.org/support/plugin/masks-form-fields/reviews/)

## 參與者及開發者

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

參與者

 *   [ Petermann ](https://profiles.wordpress.org/ivanpetermann/)

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

[將〈Masks Form Fields〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/masks-form-fields)

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

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

## 變更記錄

#### 1.12.4

 * General fixes.

#### 1.12.3

 * Fix plugin header license and domain path.
 * Tested in WordPress 6.9

#### 1.12.2

 * Add the clearIfNotMatch option to the Brazilian masks: CEP, CPF, CNPJ, and phone
   number.
 * Tested in WordPress 6.8

#### 1.11.2

 * Convert line endings from CRLF to LF
 * Tested in WordPress 6.7

#### 1.11.1

 * Fixed JS minification conflict: Added semicolon after JSON declaration in wp_add_inline_script.(
   commit#3529ce1)
 * Added option for the format of the Brazilian phone number, with attribute ‘name’
   equal to ‘phonebr’. (commit#9c14400)

#### 1.10

 * Replaced wp_localize_script with wp_add_inline_script. (commit#6f6dc2d)
 * Updated minimum WordPress version requirement from 3.9 to 4.5.
 * Tested in WordPress 6.5

#### 1.9

 * Fixed conflict with another library.
 * Tested in WordPress 5.9

#### 1.8

 * Added five new mask formats. (date_time2, money5, money6, percent5, percent6)
 * Updated readme with usage example.

#### 1.7

 * Added new mask formats. (start, time2, zip, taxid, ssn, money3, money4, percent2,
   percent3, percent4)

#### 1.6

 * Tested in WordPress 5.8

#### 1.5

 * Fixed the incorrect value in the localize script.
 * Tested in WordPress 5.7

#### 1.4

 * Updated Readme description
 * Updated jQuery Mask library
 * Tested in WordPress 5.5

#### 1.3

 * 2019-06-10
 * Tested in WordPress 5.2

#### 1.2

 * 2017-11-20
 * Tested in WordPress 4.9

#### 1.1

 * 2017-8-7
 * Bug fix: remove date and time mask on body class.
 * Add mask only span and input fields.

#### 1.0

 * 2016-11-3
 * Initial release

## 中繼資料

 *  版本 **1.12.4**
 *  最後更新 **2 週前**
 *  啟用安裝數 **9,000+**
 *  WordPress 版本需求 ** 4.5 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.0**
 *  PHP 版本需求 ** 5.6 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/masks-form-fields/)、[Portuguese (Brazil)](https://br.wordpress.org/plugins/masks-form-fields/)、
   [Swedish](https://sv.wordpress.org/plugins/masks-form-fields/)、及 [Ukrainian](https://uk.wordpress.org/plugins/masks-form-fields/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/masks-form-fields)
 * 標籤:
 * [contact form 7](https://tw.wordpress.org/plugins/tags/contact-form-7/)[field](https://tw.wordpress.org/plugins/tags/field/)
   [form](https://tw.wordpress.org/plugins/tags/form/)[mask](https://tw.wordpress.org/plugins/tags/mask/)
   [phone](https://tw.wordpress.org/plugins/tags/phone/)
 *  [進階檢視](https://tw.wordpress.org/plugins/masks-form-fields/advanced/)

## 評分

 5 星，滿分為 5 星

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

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

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

## 參與者

 *   [ Petermann ](https://profiles.wordpress.org/ivanpetermann/)

## 技術支援

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

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

## 贊助

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

 [ 贊助這個外掛 ](https://ivanpetermann.com/donation)