These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Setting font size of textfield by javascript in form designer

rcwip
Registered: Oct 30 2010
Posts: 13

Hi there. I got a fillable pdf created by form designer. Spaces of most textfields are limited to the preset value (i.e. 150 characters). Can I use javascript to set the default font size to point 12 and if the input text exceeds the textfield area, the font size will be automatically set to "auto font size" but not less than point 8. Is it possible? I know I can set the font size to auto font size by setting the default font size to "0". But in my case, the default font size must be point 12 and the minimum is 8. Is it possible? Thanks.

rcwip
Registered: Oct 30 2010
Posts: 13
Hi there. I am using Livecycle designer ES2 v.9 and tried to use the following script but it seemed not to work.


var tf=this.rawValue;
if (tf.length>50) {
tf.textSize=8);
}

I put the above script in the Script Editor and set the "show" ="change", it failed, then set to "full", it failed again, then to "valudate", did not work and finally to "validationState"...also did not respond. Any anyone please advise?

Thanks.