Fiftoine
Fiftoine

Reputation: 291

Text input with placeholder staying when typing

I'd like to have a text input with a "model" as placeholder let say for an telephone number.

So the text input prompts a model like

____/______

but when the users starts typing, the place holder stays like this

0124/5_____ 

and only underscores could be replaced.

How could I achieve this?

Thanks in advance

Upvotes: 0

Views: 625

Answers (1)

ksugiarto
ksugiarto

Reputation: 951

Try using Masking, link 1 or link 2

like $(this).mask("99.999.999.9-999.999");

Upvotes: 2

Related Questions