Copy link to clipboard
Copied
I have the prompt text figured out using this script taken from this forum: Is there a way to add instructional text to my text field that will disappear when clicked? (PDF For...
// Custom Format script for text field
if (!event.value) {
event.value = "Instructional text goes here";
event.target.display = display.noPrint;
} else {
event.target.display = display.visible;
}
Is their a way to change the prompt text's size and make it different from the type size I have set for them to fill out in the form. I want the type size of the prompt to be smaller than what size they use to fill it out.
Why yes there is, and your code is already setup for adding it. The "display" is a property of the text field object, and it is being set one way for the help text, and another way when the user enters the text. The text size is also a property of the text field object and it can be set in the same way.
// Custom Format script for text field
if (!event.value) {
event.value = "Instructional text goes here";
event.target.display = display.noPrint;
event.target.textSize = 12;
} else {
event.target.displ
...Copy link to clipboard
Copied
This is a form text field.
Copy link to clipboard
Copied
So is that a "yes - it can be done" Or "No - it cannot be done"
Copy link to clipboard
Copied
I don't know.
Copy link to clipboard
Copied
Yes, it can be done. You would need to write a script to iterate over all the fields in the file (using numFields and getNthFieldName), check which ones are text fields (using getField and the type property) and then apply the code to them as the Format script (using the setAction method).