Expand my Community achievements bar.

Multilines (stay in box?)

Avatar

Former Community Member
I have a textfield over 2 lines. When I limit it to 20 characters there is no problem, as long as I don't press a couple of 'enter's.

I don't want scrollbars, cause I want to print the document. So I want to disable the scrollbars. Is this possible?
8 Replies

Avatar

Former Community Member
Yes, if you do a search for Disable Scrolling you'll find a script for it. Your best bet would be to uncheck limit characters and check the multi-line option. This will allow users to hit Enter to move to the next line and limit the text to the space available in the field.

Avatar

Former Community Member
I can't find a Disable Scrolling script. I neet to check the limit characters, cause I'm working with a barcode.

Avatar

Former Community Member
In the scripting guide I found doNotScroll, but I can't set it on any textfield

Avatar

Former Community Member
If the name of your form is form1, and the subform is named subform, and you want to limit the scrolling of a text field named tf, you would put this script into the intitialize event of the field using JavaScript:



var myDoc = event.target;

var f = myDoc.getField("form1[0].subform[0].tf[0]");

f.doNotScroll = true;

Avatar

Former Community Member
It still doesn't work. I have LiveCycle 7.1 and reader 7.08.

I saved the file as a dynamic form and I use javascript.

Avatar

Former Community Member
Dynamic forms are different, try putting this script into the docReady event of the field you want to limit the scrolling on.



var acroSOM = this.somExpression.substr(15, this.somExpression.length - 1);

var acroField = event.target.getField(acroSOM);

acroField.doNotScroll = true;

Avatar

Former Community Member
I still have a small question. Why did you take a subtring, and what is the 15 standing for. if I try it with another number, like 14, the script also works.