Jump to content

ARGHH! Bullets not working in printOne Template


EricC

Recommended Posts

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

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)

 

:confused:

Link to comment
Share on other sites

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

  • 1 year later...
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)

 

:confused:

 

Eric, did you ever figure out what the issue was with this?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...