Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
Masks Form Fields icon

Masks Form Fields

v1.11.2
by Ivan Petermann · 5.0 (23 reviews)

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

10K+ active installs Updated Oct 26, 2024 Tested to 6.7.2 Requires PHP 5.6
Try Demo Download
Pre-installed Ready in ~10s No card

About Masks Form Fields

This is a code snippet that adds a class to a form field, specifically for use with the Contact Form 7 plugin. It also provides a list of classes that can be used for different types of input fields, such as phone numbers, dates, and money. There is also an optional feature for formatting Brazilian phone numbers.

Frequently asked questions

What is the purpose of the Masks Form Fields plugin?
The Masks Form Fields plugin allows you to add masks to form fields on your WordPress website. This helps in formatting user input according to predefined patterns.
How do I use this plugin with Contact Form 7?
To use it with Contact Form 7, you can add a class to your form field. For example, use [tel your-phone class:phone placeholder "Phone"] to apply a phone mask.
What types of masks are available?
The plugin provides a variety of masks including those for dates, times, phone numbers (US and Brazilian), ZIP codes, CPF, CNPJ, money, and percentages. It also supports custom masks.

Changelog

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

Try other plugins

Really Simple SSL icon

Really Simple SSL

4.9 · 4M+ installs

The easiest way to improve security! Leverage your SSL certificate and protect your website visitors.