Discover, trust, install: FAIR 1.0 is here

Plugin Banner

Masks Form Fields

by Petermann

Version: 1.12.2

Download
Description

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').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 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

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.

Simple et fonctionne parfaitement !

By Francks (Franck-AWO) on January 27, 2024

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 😉

Good plugin

By mirazhyk on January 24, 2024

Good plugin and very quickly support) I'm like

It worked

By daprop on September 5, 2023

The only working plugin, with quality support

Very nice!

By dimmone on October 14, 2022

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.

Its works

By Marcos Nakamine (marcosnakamine) on August 2, 2022

WP 6.0.1 CF7 5.6.1

Funciona!

By Fabio Moraes (fabiomoraes) on May 26, 2022

Ate que enfim um plugin que realmente funciona!

Great plugin and support!!

By pickme on April 15, 2022

Thank you for developing this WordPress plugin and also for your support!!

Great Plugin, Great Support.

By Anonymous User 16824372 (anonymized_16824372) on November 12, 2021

Works perfect. Tested with CF7 and Elementor Pro Forms, both in-Page and in-Popup. Thank you very much.

Funciona perfeitamente - Works Great

By gurabelo17 (rabelo17) on November 11, 2021

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.

US Fields

By 925376rv on August 27, 2021

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 %);

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
  • Version:Version: 1.12.2
  • Active installs:Active installs: 10K
  • Last updated:Last updated: 5 months ago
  • Requires:Requires: 4.5
  • Tested:Tested: 6.8
Average rating:5 out of 5 stars.
  • Number of ratings: 23 ratings
  • Number of ratings: 0 ratings
  • Number of ratings: 0 ratings
  • Number of ratings: 0 ratings
  • Number of ratings: 0 ratings
Back to top