follow me on facebook follow me on twitter Instagram

Input Masks

Input masks help define what should be entered into a field. They will also save the user time while entering the information and eliminate confusion as to how to type in the data.

To define an input mask the following symbols are used.

Social Insurance Number
If the field is a SIN then the input mask would be:

     000 000 000

0 = only a number is allowed and a number must be entered
space = means, a space will be displayed.

This makes entering the SIN very easy. I don't have to worry about how to enter it. The input mask helps me.

Phone numbers
When you come to a phone number, you never know if you supposed to put in the brackets, spaces, minus sign. The input mask will put all of that in for you so you don't have to type it and it shows you that it will do this for you

     !(999) 000-0000

!= Fill in the data from left to right instead of right to left
9= only a number can be entered but it is not mandatory

This is the old way when area codes were only used for long distance and not always entered.
Today the input mask would like the following

     !(000) 000-0000

Postal Code

     >L0L 0L0

>= Will convert all text to uppercase. Good for Postal Codes
<= will convert all text to lowercase. Good for emails.

Other input masks symbols
" "= Will display whatever is inside the quotes
\= Characters following this will display as themselves.

Note:  If you plan to use the date picker then do not use an input mask. You can not use them together.

No comments:

Post a Comment