Feature Box And Icon List Plugins

Read More
Mon. - Fri. 9 am - 5 pm Support Policy
Remember me

Máscara de preenchimento automático

2 weeks 4 days ago #1

  • Rodrigo's Avatar
  • Rodrigo
  • Posts: 2
Por favor, preciso configurar alguns campos com preenchimento de máscara.

Exemplo: ao colocar os números de telefone, automaticamente preencher com (00) 0000-0000.

Obrigado.

2 weeks 4 days ago #2

  • Artem's Avatar
  • Artem
  • Posts: 7842
Hi,

Step 1.
Add this script between tags <head>...</head> in your template
<script type="text/javascript" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/jquery.inputmask.bundle.js"></script>

Step 2.
For the standard text input, add CSS class phone



Step 3.
Add this JS code to your template custom Javascript file
jQuery(document).on('ready', function(){
    jQuery('.phone input[type="text"]').inputmask({"mask": "(999) 999-9999"});
});

Regards,
Artem, Balbooa.com

2 weeks 4 days ago #3

  • Rodrigo's Avatar
  • Rodrigo
  • Posts: 2
Perfeito!
Muito obrigado.
Pode fechar o tópico.

2 weeks 3 days ago #4

  • Artem's Avatar
  • Artem
  • Posts: 7842
You're welcome :)

Regards,
Artem, Balbooa.com
Powered by Kunena Forum