How do I display a text field based on the sum of several combo box tools?
I set several combo boxes with two values, PASS (export value = 0) and FAIL (export value = 1). I have summed these values to another text box and set it to hidden. I would like another text box to appear only if the sum of the combo box values > 0 (meaning that one of the combo boxes resulted in a FAIL).
This is probably insanely simple, but I have no JavaScript experience.
I am using Acrobat 6.0.2 and the tools in the 'Advanced Editing' toolbar.
Thanks,
JM
Basically you set the field's visibility by testing the value of the hidden sum field. Use the calculation event for the field you want to make hidden/visible.
//Calculation script
var bVis = (this.getField("sumField").value > 0);event.target.display = bVis?display.visble:display.hidden;
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script