Copy link to clipboard
Copied
I'm trying to add instructional text to my form fields in Acrobat Pro DC. I found these two helpful resources that allowed me to set up the code:
Now I'm trying to figure out how to set the specific font and size for that instructional text. My current script is:
if(event.value=="")
{ event.value="Instructional text goes here..."; font.size = "10pt"; }
That results in the following:
Now I just need to change the font and size so it fits better. What script/code can I add? Can anyone help?
Copy link to clipboard
Copied
This code is incorrect:
font.size = "10pt";
Use this, instead:
event.target.textSize = 10;
And to set the font you need to know the internal name of it, and then apply it to the textFont property, like this:
event.target.textFont = "Arial";
Copy link to clipboard
Copied
See this article and watch the vidoes:
https://www.pdfscripting.com/public/Editing-Fields-Properties.cfm