This is perfect, Dan. Thanks!
-----Original Message----- From: Dan Korn [mailto:[EMAIL PROTECTED] Sent: Friday, July 25, 2008 5:15 PM To: FusionPro Users Forum Subject: [fusionpro] RE: Two line phone formatting For the phone number itself, to put the area code on a separate line, and separate the rest with a space, start with the "Change phone format Rule" template, convert it to JavaScript, and add this after the first line: //simple 7 digit phone var formatStyle01 = "<br>$1 $2"; //simple 10 digit phone var formatStyle02 = "$1<br>$2 $3"; //10 digit phone starts with 1 var formatStyle03 = "+$1 $2<br>$3 $4"; //10 digit phone with extension var formatStyle04 = "$1<br>$2 $3 ext.$4"; //10 digit phone starts with 1 with extension var formatStyle05 = "+$1 $2<br>$3 $4 ext.$5"; //7 digit phone with extension var formatStyle06 = "<br>$1.$2 ext.$3"; var thisNumber = Field(Var1); return formatNumber(Trim(thisNumber)); Make sure to check "Treat returned strings as tagged text." As for the rest, I don't know what label you're using, but one way to accomplish what you describe is to replace the last line of the above (the "return" line) with this: var num = formatNumber(Trim(thisNumber)); num = ReplaceSubstring(num, "<br>", "<br><t>"); var label = "Phone:"; // whatever you want here return label + "<t>" + num; Replace the label with whatever you want. Then you just need to set the tab stop as appropriate in the Edit Tab Stops dialog where you're inserting the result of this rule. (You could set the tab stop programmatically in the rule as well, but that's more complicated. There are other ways to do this besides using tabs as well.) Dan -----Original Message----- From: [EMAIL PROTECTED] I need to format phone numbers on a business card where the label and area code is on the first line and the rest of the phone number is on the second line (lined up directly under the area code, not the label), and the phone number is separated by spaces (xxx xxxx). Could anyone help with a javascript? I do not need to validate that the phone number is entered correctly, as I do that at input time. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- FusionPro 5.0 Now Available! Variable text on a curve and soft drop-shadows for variable text LIMITED TIME upgrade offer of $299 per license for current customers: http://fusionpro.printable.com/store/upgrade New licenses available for $599 each at: http://fusionpro.printable.com/store/ All FusionPro 5.0 customers to receive FusionPro 5.1 with Adobe Acrobat 8 and InDesign CS3 support when released for FREE. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- -- Users of FusionPro Desktop have unlimited free email support. Contact Printable Support at [EMAIL PROTECTED] -- View FusionPro Knowledge Base, FusionPro Samples at www.printable.com/vdp/desktop.htm -- You are currently subscribed to fusionpro as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] -- -- Note: All e-mail sent to or from this address will be received or otherwise recorded by the e-mail recipients of this forum. It is subject to archival, monitoring or review by, and/or disclosure to someone other than the recipient. Our privacy policy is posted on www.printplanet.com -- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- FusionPro 5.0 Now Available! Variable text on a curve and soft drop-shadows for variable text LIMITED TIME upgrade offer of $299 per license for current customers: http://fusionpro.printable.com/store/upgrade New licenses available for $599 each at: http://fusionpro.printable.com/store/ All FusionPro 5.0 customers to receive FusionPro 5.1 with Adobe Acrobat 8 and InDesign CS3 support when released for FREE. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- -- Users of FusionPro Desktop have unlimited free email support. Contact Printable Support at [EMAIL PROTECTED] -- View FusionPro Knowledge Base, FusionPro Samples at www.printable.com/vdp/desktop.htm -- You are currently subscribed to fusionpro as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] -- -- Note: All e-mail sent to or from this address will be received or otherwise recorded by the e-mail recipients of this forum. It is subject to archival, monitoring or review by, and/or disclosure to someone other than the recipient. Our privacy policy is posted on www.printplanet.com --
