Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Auto font size for textfield by javascript

Avatar

Level 2

Hi there.  I got the following script for a textfield in a fillabe PDF.  Th length of the textfield is 150.  It is required that if the text is > 100, the text size will be set to point 8, otherwise it will be point 12.

var tf = this.rawValue;

if (tf.length>50) {

tf.textSize=8;

}

The above script was added to the script editor show=Change (not ok), full (failed), validate & validationState (no response).  Did I miss something?

Thanks.

1 Reply