Masks Form Fields



Elegant Themes - Beautiful WordPress Themes

A jQuery Plugin to make masks on form fields and HTML elements for WordPress.

Basic Usage Examples

Add a class in the form field.

<input type=”telname=”your-phoneclass=”phone />

Contact Form 7: [tel your-phone class:phone placeholder “Phone”]

$(‘span.date, input.date’).mask(’00/00/0000′);
$(‘span.time, input.time’).mask(’00:00:00′);
$(‘input.date_time’).mask(’00/00/0000 00:00:00′);
$(‘input.cep’).mask(‘00000-000’);
$(‘input.phone’).mask(‘(00) 0000-00009’);
$(‘input.phone_us’).mask(‘(000) 000-0000’);
$(‘input.mixed’).mask(‘AAA 000-S0S’);
$(‘input.cpf’).mask(‘000.000.000-00’);
$(‘input.cnpj’).mask(‘00.000.000/0000-00’);
$(‘input.money’).mask(‘000.000.000.000.000,00’);
$(‘input.money2’).mask(‘#.##0,00’);
$(‘input.ip_address’).mask(‘099.099.099.099’);
$(‘input.percent’).mask(‘##0,00%’);

Frequently Asked Questions

Installation Instructions

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

Can I add new mask types?

Yes, use the code below.

The mask plugin work with WooCommerce?

Unfortunately, it does not support WooCommerce. But can keep the plugin active and try to insert one of the codes in the links below to add the mask.
JavaScript
PHP (functions.php)