How to implement Custom Mask for text fields?
Posted: 2015-09-25 15:17
Hi, i need to make custom masks for dome fields, for brazilian documents, like:
1- CPF
- 11 sequentially numbers stored widhout mask, like: 11111111111
- The mask : ###.###.###-##
- Number masked: 111.111.111-11
2- CNPJ
- 14 sequentially numbers stored widhout mask, like: 11111111000111
- The mask : ##.###.###/####-##
- Number masked: 11.111.111/0001-11
3- Brazil Phone Number
- 14 sequentially numbers stored widhout mask, like: 11111111000111
- The mask : (##) ####-####
- Number masked: (64) 9285-7651
Notes
#1 - In some states, we have phones with a 5 digit prefix, then the mask turns on (##) #####-#### and i really don't know how to do these changes on appgini.
#2 - I am working with an existing database and the 3 types of fields (cpf, cnpj and phones) are text fields with 11, 14 and 11 chars respectively.
Can you help me?
1- CPF
- 11 sequentially numbers stored widhout mask, like: 11111111111
- The mask : ###.###.###-##
- Number masked: 111.111.111-11
2- CNPJ
- 14 sequentially numbers stored widhout mask, like: 11111111000111
- The mask : ##.###.###/####-##
- Number masked: 11.111.111/0001-11
3- Brazil Phone Number
- 14 sequentially numbers stored widhout mask, like: 11111111000111
- The mask : (##) ####-####
- Number masked: (64) 9285-7651
Notes
#1 - In some states, we have phones with a 5 digit prefix, then the mask turns on (##) #####-#### and i really don't know how to do these changes on appgini.
#2 - I am working with an existing database and the 3 types of fields (cpf, cnpj and phones) are text fields with 11, 14 and 11 chars respectively.
Can you help me?