I would like to make an HTML text input field that formats a phone number as the user is typing it. For instance, when you type the phone number into the input field, for example 0213858954555, the input field would automatically format the phone number to (021) 385-86111111
Here's my current code:
<div class="form_row clearfix custom_fileds owner_name">
<div class="col-sm-4">
<label class=r_lbl>Mobile numbers :
<!--<span class="required">*</span>-->
</label>
</div>
<div class="col-sm-8">
<input name="mobile_no" id="mobile_no" value="" type="text" class="textfield " placeholder=" "/>
</div>
</div>