Brad Sawatzky Posted October 22, 2012 Share Posted October 22, 2012 I've been trying to customize a phone format rule to return a different font after the area code, and I'm close, but I'm missing something. I've copied a rule from a previous post and customized it, but when I validate I get: "(mulitple font phone1 rule, line 11: ReferenceError: formatNumber is not defined)" My existing rule looks like: var thisNumber = Field("Phone1"); var afterAreaCodeTags = "<f name= \"CB Univers 67 CondensedBold\">"; var formatStyle01 = afterAreaCodeTags + "$1-$2"; //simple 7 digit phone var formatStyle02 = "$1-" + afterAreaCodeTags + "$2-$3"; //simple 10 digit phone var formatStyle03 = "+$1 $2-" + afterAreaCodeTags + "$3-$4"; //10 digit phone starts with 1 var formatStyle04 = "$1-" + afterAreaCodeTags + "$2-$3 ext.$4"; //10 digit phone with extension var formatStyle05 = "+$1 $2-" + afterAreaCodeTags + "$3-$4 ext.$5"; //10 digit phone starts with 1 with extension var formatStyle06 = afterAreaCodeTags + "$1-$2 ext.$3"; //7 digit phone with extension return formatNumber(Trim(thisNumber)); If anyone can point me in the right direction, I'd sure appreciate the help. Thanks Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted October 22, 2012 Share Posted October 22, 2012 You removed the code from the "Change phone format Rule" after the "DO NOT EDIT BELOW THIS LINE" comment. Quote Link to comment Share on other sites More sharing options...
Brad Sawatzky Posted October 22, 2012 Author Share Posted October 22, 2012 Well, thats a little embarassing. Appreciate the help Dan. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.