I'm trying to figure out how to write a phone formatting rule that will allow for this format: 336 876 9876
I was trying this out below but had some issues if an extension was present or if there was no area code. I'm completely in the dark when it comes to coding! HALP:)
var str = Field("Phone");//Phone
var newStr = str.replace(/\s+/g, '');
return Left(newStr,3) + " " + Left(Right(newStr,6),3) + " " + Right(newStr,4);
Thanks in advanced!
Hilary