2

I would like to have a telephone input that automatically inserts two dashes into the phone number, and as the user types, the numbers automatically go before and after the dashes appropriately like:

555 - 555 - 5555

Is this possible using the html5 telephone input and pattern attribute? Is there a cross browser way to do so?

Thanks!

Kara
  • 6,115
  • 16
  • 50
  • 57
HandiworkNYC.com
  • 10,914
  • 25
  • 92
  • 154
  • See: http://stackoverflow.com/questions/2813997/is-it-okay-to-use-input-type-tel-now – Bartek May 31 '13 at 02:39
  • http://stackoverflow.com/questions/11633726/phone-mask-with-jquery – Will May 31 '13 at 02:40
  • 1
    Is this really a duplicate question? It asks for a mask using pattern attribute with input type tel. The linked questions are about masking using jQuery and input type tel support. – peater Jan 29 '16 at 15:11

0 Answers0