Hide instructional text when printing hard copy
i have following scripts in acrobat pdf document field properties instructional text appear when blank, , disappears if user types in field. after filling out form, print hard copy, , wherever there blank field, instructional text prints too. how can prevent printing? thank in advance help!
// custom format script text field
if (!event.value) {
- event.value = "instructional text goes here";
- event.target.display = display.noprint;
} else {
- event.target.display = display.visible;
}
// on focus script:
if (event.target.value==event.target.defaultvalue) {
- event.target.value = "";
- event.target.textcolor = ["rgb", 0/255, 153/255, 51/255];
- event.target.textfont = "myriadpro-regular";
- event.target.textsize = 0;
}
// on blur script:
if (event.target.value=="") {
- event.target.value = event.target.defaultvalue;
- event.target.textcolor = color.gray;
- event.target.textfont = "myriadpro-it";
- event.target.textsize = 0; // means auto
}
if lines of code include "a.", "b.", etc, each of scripts should generate errors. first script should be:
// custom format script text field
if (!event.value) {
event.value = "instructional text goes here";
event.target.display = display.noprint;
} else {
event.target.display = display.visible;
}
More discussions in JavaScript
adobe
Comments
Post a Comment