Link to home
Start Free TrialLog in
Avatar of Aleks
AleksFlag for United States of America

asked on

Bootstrap/jquery - how to mask a field (date/phone, etc)

I have a field where a phone number will be entered.
How can I format it as the user types it to be (999) 999-9999

I have seen it where the parenthesis and the dash are already there and the numbers fit in as the user types the number

How can I do this ?
This is my field right now:

<div class="col-md-12 margin-bottom-20">
										<label >Phone * </label>
										<input name="phone" type="text" class="form-control" id="phone" value="" maxlength="50">
									</div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Paweł
Paweł
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial