Expand my Community achievements bar.

Auto bullets in multiline text box

Avatar

Former Community Member

Hi,

I have found a script to add bullets on pressing Enter key in a multiline text box http://forums.adobe.com/message/1359280#1359280

But the scripts outputs as:

**** Some text

***Some Text

**Some Text

* Some Text

So this script adds one more bullet to every new line, thus if there are 10 lines then it will show 10 bullets.

Please help me resolve it such that every new line creates only 1 bullet.

I also found another way :

this.rawValue = "*" + "" + this.rawValue + "\r";

But this method does not create a new line and adds "*" on a single line everytime I press enter.

The third way to do this by using the change event :

if (xfa.event.change == "\u000A") {

          xfa.event.change = "\u000A" + " • ";

}

It also did not work for me.

2 Replies

Avatar

Level 6

[Moved to LiveCycle Designer forum]

Avatar

Level 8

How about this in your change event:

if (/[\r\n]/.test(xfa.event.change))

xfa.event.change=xfa.event.change+"\u2022";

Kyle