Skip to main content
Known Participant
November 25, 2019
Question

Document will print

  • November 25, 2019
  • 1 reply
  • 597 views

There is a tool for "documents will print", I would like to clear all default place holders.  is this possible?

 

I found and modified this script and I added in an alert and the default values are not deleted,

 

for ( var i = 0; i < this.numFields; i++) {
var fname = this.getNthFieldName(i);
var ffield = this.getField(fname);
console.println("fname: "+ fname + " - ffield.value: " + ffield.value);
if (ffield != null && ffield.value==ffield.defaultValue) {
ffield.value = "";
}
}

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
November 25, 2019

The code seems fine. Where exactly did you place it, and what is the result of running it?

Also, are there error message in the JS Console?

blenkhn1Author
Known Participant
November 25, 2019

the code is placed in the Document Actions under "Document Will Print" as I want the defaults to be cleared before it prints