EricC Posted July 1, 2010 Share Posted July 1, 2010 I'm going crazy here... I have a versioned template with 5 text fields. Each field is a multi-line text box. I am NOT using the Rich Text Editor ... just the simple HTML-flavored multi-line text box. I want the user to enter a few lines into each field. (pressing the Enter key to get to the next line) EACH line needs to be preceded with a bullet, so in my FusionPro template I placed the following rule: var myArray = Field("Spec1").split("\n"); var myList = ""; var myBullet = "<superscript><span pointsize=7 color=\"Magenta\" font=\"Webdings\">g</span></superscript><t>"; for (x in myArray) { if (x == 0) { myList += myBullet + myArray[x]; } else { myList += "<br />" + myBullet + myArray[x]; } } return myList; Shouldn't this work? It splits the content whenever it finds \n When I upload this template to my printOne store, the \n isn't recognized. This seems to be a bug, unless I am missing something obvious here. Since \n didn't work, I also tried the following instead: "\r" "\n\r" "\r\n" "%0D" "\x0d" "<br />" "<br>" Seems like no matter what I do, I get this: * Line 1 Line 2 Line 3 Line 4 ...instead of this: * Line 1 * Line 2 * Line 3 * Line 4 Any ideas? I've been at this for two hours now. My brain hurts. Link to comment Share on other sites More sharing options...
jstehman Posted July 1, 2010 Share Posted July 1, 2010 Hello Eric, I forwarded the email you sent to support today to our graphics team so we are looking at this as well, one of us will get back to you. Jeff Stehman Technical Support | Printable Technologies Inc. jstehman@printable.com | http://www.printable.com 858.847.6622 direct | 800.220.1727 office Link to comment Share on other sites More sharing options...
stellasparkles Posted July 1, 2010 Share Posted July 1, 2010 HI Eric~ Try <p> - I think that's what it sees once the template is loaded into MarcomCentral. Link to comment Share on other sites More sharing options...
EricC Posted July 1, 2010 Author Share Posted July 1, 2010 didn't work. I tried it like this: var myArray = Field("Spec1").split("<p>"); and also like this: var myArray = Field("Spec1").split('<p>'); (single quotes and double quotes) Link to comment Share on other sites More sharing options...
stellasparkles Posted July 1, 2010 Share Posted July 1, 2010 Eric, can you send your template to GFX@printable.com, we know that the <p> is the correct linebreak value to search for, so we will check it out and get it working for you. Thanks Link to comment Share on other sites More sharing options...
LesSjo Posted July 7, 2010 Share Posted July 7, 2010 I use something like this on some of the online forms I use. The fontName and fontSize I set separately from the bullets so I only have to change it in one location. var fontName = "Helvetica"; var fontSize = 7.0; // Returns round bullet return ' <f name="Zapf Dingbats"><z newsize="4.5"><superscript>l</superscript><f name='+fontName+'><z newsize='+fontSize+'> '; // // Returns square bullet //return ' <f name="Zapf Dingbats"><z newsize="4.5"><superscript>n</superscript><f name='+fontName+'><z newsize='+fontSize+'> '; You still need to check the "treat return text as tagged string" box. save it as a new rule and use the new rule name wherever you need a bullet. Hope it helps. Link to comment Share on other sites More sharing options...
Hadrian Posted October 17, 2011 Share Posted October 17, 2011 didn't work. I tried it like this: var myArray = Field("Spec1").split("<p>"); and also like this: var myArray = Field("Spec1").split('<p>'); (single quotes and double quotes) Eric, did you ever figure out what the issue was with this? Link to comment Share on other sites More sharing options...
Recommended Posts