Craig Zirnheld
Craig Zirnheld

Reputation: 139

How to hide a field in Adobe Acrobat Pro DC based on another fields content

I want to hide a fields content based on whether a preceding field is empty or not. How do I do that in Adobe Acrobat Pro DC version 19.008.20081.46137

Upvotes: 0

Views: 2033

Answers (1)

joelgeraci
joelgeraci

Reputation: 4927

Where "foo" is the name of the field that may be hidden, add the following to the custom Format script of the field that may or may not have a value.

if (event.target.value == "") {
    this.getField("foo").display = display.hidden;
}
else {
    this.getField("foo").display = display.visible;
}

enter image description here

Upvotes: 1

Related Questions