# Metronic | Input Masks
Input masks examples

Hi, Sean S

##### Input Masks

Actions
jquery.inputmask is a jQuery plugin which create an input mask. An input mask helps the user with the input by ensuring a predefined format. This can be useful for dates, numerics, phone numbers, etc.
For more info please visit the plugin's Demo Page or Github Repo.

### Input Mask Examples

    							<div class="card card-custom">
    								<div class="card-header">
    									<h3 class="card-title">
    										Input Mask Examples
    									</h3>
    								</div>
    								<!--begin::Form-->
    								<form class="form">
    									<div class="card-body">
    										<div class="form-group row">
    											<label class="col-form-label text-right col-lg-3 col-sm-12">Date</label>
    											<div class="col-lg-6 col-md-9 col-sm-12">
    												<input type='text' class="form-control" id="kt_inputmask_1" type="text"/>
    												<span class="form-text text-muted">Custom date format: <code>mm/dd/yyyy</code></span>
    											</div>
    										</div>
    										<div class="form-group row">
    											<label class="col-form-label text-right col-lg-3 col-sm-12">Custom Placeholder</label>
    											<div class="col-lg-6 col-md-9 col-sm-12">
    												<input type='text' class="form-control" id="kt_inputmask_2" type="text"/>
    												<span class="form-text text-muted">Date mask with custom placeholder: <code>mm/dd/yyyy</code></span>
    											</div>
    										</div>
    										<div class="form-group row">
    											<label class="col-form-label text-right col-lg-3 col-sm-12">Phone Number</label>
    											<div class="col-lg-6 col-md-9 col-sm-12">
    												<input type='text' class="form-control" id="kt_inputmask_3" type="text"/>
    												<span class="form-text text-muted">Phone number mask: <code>(999) 999-9999</code></span>
    											</div>
    										</div>
    										<div class="form-group row">
    											<label class="col-form-label text-right col-lg-3 col-sm-12">Empty Placeholder</label>
    											<div class="col-lg-6 col-md-9 col-sm-12">
    												<input type='text' class="form-control" id="kt_inputmask_4" type="text"/>
    												<span class="form-text text-muted">Phone number mask: <code>99-9999999</code></span>
    											</div>
    										</div>
    										<div class="form-group row">
    											<label class="col-form-label text-right col-lg-3 col-sm-12">Repeating Mask</label>
    											<div class="col-lg-6 col-md-9 col-sm-12">
    												<input type='text' class="form-control" id="kt_inputmask_5" type="text"/>
    												<span class="form-text text-muted">Mask <code>9</code>, <code>99</code> or ... <code>9999999999</code></span>
    											</div>
    										</div>
    										<div class="form-group row">
    											<label class="col-form-label text-right col-lg-3 col-sm-12">Right Align</label>
    											<div class="col-lg-6 col-md-9 col-sm-12">
    												<input type='text' class="form-control" id="kt_inputmask_6" type="text"/>
    												<span class="form-text text-muted">Right aligned numeric mask</span>
    											</div>
    										</div>
    										<div class="form-group row">
    											<label class="col-form-label text-right col-lg-3 col-sm-12">Currency</label>
    											<div class="col-lg-6 col-md-9 col-sm-12">
    												<input type='text' class="form-control" id="kt_inputmask_7" type="text"/>
    												<span class="form-text text-muted">Currency format <code>€ ___.__1.234,56</code></span>
    											</div>
    										</div>
    										<div class="form-group row">
    											<label class="col-form-label text-right col-lg-3 col-sm-12">IP Address</label>
    											<div class="col-lg-6 col-md-9 col-sm-12">
    												<input type='text' class="form-control" id="kt_inputmask_8" type="text"/>
    											</div>
    										</div>
    										<div class="row">
    											<label class="col-form-label text-right col-lg-3 col-sm-12">Email Address</label>
    											<div class="col-lg-6 col-md-9 col-sm-12">
    												<input type='text' class="form-control" id="kt_inputmask_9" type="text"/>
    											</div>
    										</div>
    									</div>
    									<div class="card-footer">
    										<div class="row">
    											<div class="col-lg-9 ml-lg-auto">
    												<button type="reset" class="btn btn-primary mr-2">Submit</button>
    												<button type="reset" class="btn btn-secondary">Cancel</button>
    											</div>
    										</div>
    									</div>
    								</form>
    								<!--end::Form-->
    							</div>

    						// Class definition

    						var KTInputmask = function () {

    							// Private functions
    							var demos = function () {
    								// date format
    								$("#kt_inputmask_1").inputmask("99/99/9999", {
    									"placeholder": "mm/dd/yyyy",
    									autoUnmask: true
    								});

    								// custom placeholder
    								$("#kt_inputmask_2").inputmask("99/99/9999", {
    									"placeholder": "mm/dd/yyyy",
    								});

    								// phone number format
    								$("#kt_inputmask_3").inputmask("mask", {
    									"mask": "(999) 999-9999"
    								});

    								// empty placeholder
    								$("#kt_inputmask_4").inputmask({
    									"mask": "99-9999999",
    									placeholder: "" // remove underscores from the input mask
    								});

    								// repeating mask
    								$("#kt_inputmask_5").inputmask({
    									"mask": "9",
    									"repeat": 10,
    									"greedy": false
    								}); // ~ mask "9" or mask "99" or ... mask "9999999999"

    								// decimal format
    								$("#kt_inputmask_6").inputmask('decimal', {
    									rightAlignNumerics: false
    								});

    								// currency format
    								$("#kt_inputmask_7").inputmask('€ 999.999.999,99', {
    									numericInput: true
    								}); //123456  =>  € ___.__1.234,56

    								//ip address
    								$("#kt_inputmask_8").inputmask({
    									"mask": "999.999.999.999"
    								});

    								//email address
    								$("#kt_inputmask_9").inputmask({
    									mask: "*{1,20}[.*{1,20}][.*{1,20}][.*{1,20}]@*{1,20}[.*{2,6}][.*{1,2}]",
    									greedy: false,
    									onBeforePaste: function (pastedValue, opts) {
    										pastedValue = pastedValue.toLowerCase();
    										return pastedValue.replace("mailto:", "");
    									},
    									definitions: {
    										'*': {
    											validator: "[0-9A-Za-z!#$%&'*+/=?^_`{|}~\-]",
    											cardinality: 1,
    											casing: "lower"
    										}
    									}
    								});
    							}

    							return {
    								// public functions
    								init: function() {
    									demos();
    								}
    							};
    						}();

    						jQuery(document).ready(function() {
    							KTInputmask.init();
    						});

Date
Custom date format: `mm/dd/yyyy`
Custom Placeholder
Date mask with custom placeholder: `mm/dd/yyyy`
Phone Number
Phone number mask: `(999) 999-9999`
Empty Placeholder
Phone number mask: `99-9999999`
Repeating Mask
Mask `9`, `99` or ... `9999999999`
Right Align
Right aligned numeric mask
Currency
Currency format `€ ___.__1.234,56`
IP Address
Email Address

### User Profile 12 messages

James Jones
Application Developer
jm@softplus.com Sign Out
My Profile
Account settings and more update
My Messages
Inbox and tasks
My Activities
Logs and notifications
My Tasks
latest tasks and projects

##### Recent Notifications

Another purpose persuade Due in 2 Days
+28%
Would be to people Due in 2 Days
+50%
Purpose would be to persuade Due in 2 Days
-27%
The best product Due in 2 Days
+8%

#### Shopping Cart

iBlender The best kitchen gadget in 2020
$ 350 for 5
SmartCleaner Smart tool for cooking
$ 650 for 4
CameraMax Professional camera for edge cutting shots
$ 150 for 3
4D Printer Manufactoring unique objects
$ 1450 for 7
MotionWire Perfect animation tool
$ 650 for 7

##### System Messages

Top Authors Most Successful Fellas
+82$
Popular Authors Most Successful Fellas
+280$
New Users Most Successful Fellas
+4500$
Active Customers Most Successful Fellas
+4500$
Bestseller Theme Most Successful Fellas
+4500$

##### Notifications

Another purpose persuade Due in 2 Days
+28%
Would be to people Due in 2 Days
+50%
Purpose would be to persuade Due in 2 Days
-27%
The best product Due in 2 Days
+8%
5 new user generated report
Reports based on sales
2 new items submited
by Grog John
79 PSD files generated
Reports based on sales
$2900 worth producucts sold
Total 234 items
4.5h-avarage response time
Fostest is Barry
3 Defence alerts
40% less alerts thar last week
Avarage 4 blog posts per author
Most posted 12 time
16 authors joined last week
9 photodrapehrs, 7 designer
2 new items have been submited
by Grog John
2.8 GB-total downloads size
Mostly PSD end AL concepts
$2900 worth producucts sold
Total 234 items
7 new user generated report
Reports based on sales
4.5h-avarage response time
Fostest is Barry

##### Customer Care

Enable Notifications:
Enable Case Tracking:
Support Portal:

##### Reports

Generate Reports:
Enable Report Export:
Allow Data Collection:

##### Memebers

Enable Member singup:
Allow User Feedbacks:
Enable Customer Portal:
Matt Pears
Active
Matt Pears 2 Hours
How likely are you to recommend our company to your friends and family?
3 minutes You
Hey there, we’re just writing to let you know that you’ve been subscribed to a repository on GitHub.
Matt Pears 40 seconds
Ok, Understood!
Just now You
You’ll receive notifications for all issues, pull requests!
Matt Pears 40 seconds
You can unwatch this repository immediately by clicking here: https://github.com
Just now You
Discover what students who viewed Learn Figma - UI/UX Design. Essential Training also viewed
Matt Pears 40 seconds
Most purchased Business courses during this sale!
Just now You
Company BBQ to celebrate the last quater achievements and goals. Food and drinks provided

#### Select A Demo

##### Demo 1

Default RTL Version

##### Demo 2

Default RTL Version

##### Demo 3

Default RTL Version

##### Demo 4

Default RTL Version

##### Demo 5

Default RTL Version

##### Demo 6

Default RTL Version

##### Demo 7

Default RTL Version

##### Demo 8

Default RTL Version

##### Demo 9

Default RTL Version

##### Demo 10

Default RTL Version

##### Demo 11

Default RTL Version

##### Demo 12

Default RTL Version

##### Demo 13

Default RTL Version

##### Demo 14

Coming soon

##### Demo 15

Coming soon

##### Demo 16

Coming soon

##### Demo 17

Coming soon

##### Demo 18

Coming soon

##### Demo 19

Coming soon

##### Demo 20

Coming soon

##### Demo 21

Coming soon

##### Demo 22

Coming soon

##### Demo 23

Coming soon

##### Demo 24

Coming soon

##### Demo 25

Coming soon

##### Demo 26

Coming soon

##### Demo 27

Coming soon

##### Demo 28

Coming soon

##### Demo 29

Coming soon

##### Demo 30

Coming soon