Paste the code below to an html element. Add a Reg expression to your form and set the name to phone then set the max length allowed to 14. Set the reg expression to custom and paste this into it.
/^\([0-9]{3}\)-[0-9]{3}-[0-9]{4}$/

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript">$(function() {
$("input[name='phone']").keyup(function() {
var curchr = this.value.length;
var curval = $(this).val();
if (curchr == 3) {
$("input[name='phone']").val("(" + curval + ")" + " ");
} else if (curchr == 9) {
$("input[name='phone']").val(curval + "-");
}
});
});</script>