Answered
Document Javascript works in Acrobat, but not in Reader when called as a function from fields
- May 19, 2023
- 2 replies
- 1541 views
I have a series of fields that are set to remain hidden until a particular calculating field's value goes above zero. I have a script at the document level that is called from the series of fields as a function in Custom calculation script (see below.) This works great in Acrobat but not in Reader. If I modify it where the script is directly in each field, it works in Reader. I use Adobe Acrobat 2020 and Adobe Acrobat DC Reader. I have attached the file.
function unhideFields() {
var a = this.getField("txtAdjustmentAmt");
var f = event.target;
if (a.value > 0)
{
f.display = display.visible;
}
else if (a.value <= 0)
{
f.display = display.hidden;
}
}Thank you,
Teagan
