Paste the following script in the Javascripts section of the page selecting 'Before Body End Tag' as the placement. You can change the mask to any phone number format you want:
<script src="https://code.jquery.com/jquery-1.12.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/3.1.62/jquery.inputmask.bundle.js"></script>
<script>
/**
* Do not remove this section; it allows our team to troubleshoot and track feature adoption.
* TS:0002-08-073
*/
$("document").ready(function() {
//Change the mask to any format you want. Example: (###)-###-####, (###) ### ####
var phones = [{ "mask": "###-###-####"}];
//Change phone_number for the ID of your phone field.
$('#phone_number').inputmask({
mask: phones,
greedy: false,
definitions: { '#': { validator: "[0-9]",
cardinality: 1}}
});
});
</script>