Masks Form Fields

外掛說明

Add a class in the form field.

Example of use with Contact Form 7:

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

Listing of classes available for use.

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

Click here for more details on how to add custom mask.

Credits

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 for more details on how to add custom mask.

使用者評論

2021 年 11 月 11 日
O plugin atende perfeitamente aquilo que propõem. O código é bem estruturado e não causa conflitos com temas e outros plugins. O suporte do desenvolvedor é incrível. The plugin perfectly meets what they propose. The code is well structured and doesn't conflict with themes and other plugins. The developer support is amazing.
2021 年 8 月 27 日
to make more usable in the US a few more fields from the following list: $('span.start, input.start').mask('00/0000'); $('span.time, input.time').mask('00:00'); $('input.taxid').mask('00-0000000'); $('input.ssn').mask('000-00-0000'); $('input.zip').mask('00000'); $('input.phone_us').mask('(000) 000-0000'); $('input.money').mask('$0,000,000', {reverse: true}); $('input.money2').mask("#,##0", {reverse: true}); $('input.percent').mask('990.0%', {reverse: true}); Thank you for your quick update. To make it even more practical, please consider adding the following masks to the default list: date_time2 for making appointments: mm/dd/yyyy hh:mm (no need for seconds); money5 for larger amounts of US dollars: $###,###,##0 (no need for cents); percent5 for use in estimates: 9,990% (no need for partial %);
2021 年 7 月 8 日
Un plugin liviano, flexible y con uno de los mejores soportes que he visto. El desarrollador responde cada pregunta de forma muy profesional.
2020 年 6 月 30 日
Works nice. By the way, I changed the "class" to "id" requirements for get the info and transform. None conflict
閱讀全部 16 則使用者評論

參與者及開發者

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

參與者

Masks Form Fields 外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將 Masks Form Fields 外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

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