Copy link to clipboard
Copied
Calculation results in a zero which appears in the field. My form will be used for both online and hand-written completion. I am K with keeping the 0 when viewing and/or completing online, but do not want it to print Is there a validation script?
Copy link to clipboard
Copied
Not sure if you are using LiveCycle, but it you are. This is pretty basic.
In the form's preprint event use:
if (this.resolveNode("TextField1").rawValue == "0") {
this.resolveNode("TextField1").presence = "invisible";
}
and in the postprint event use:
if (this.resolveNode("TextField1").rawValue == "0") {
this.resolveNode("TextField1").presence = "visible";
}
When the form is printed (or cancelled before printing, if the textfield is 0, the field is made invisible. After printing, if the field is 0 (which it would still be), then it will be made visible again.
Copy link to clipboard
Copied
Hi.
Assuming that the form have a white background, I use a Validation script that colors the number to white if = zero.
So it's invisible on the screen and on the paper.
event.target.textColor = event.value == 0 ? color.white : color.black;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now