I have an inventory form which includes a Description field and then calculations for adding and subtracting to get a total inventory for a given item. As I have it calculating the total right now, it always displays zero whether the calculations = 0 or if nothing was ever entered.
What I would like, is for the Total to be blank if the Description of the item is empty.
I have read many examples on the forum and can't get any to work. Currently, I have the following code in the Custom Validation Script. It worked when I was just checking for event.value ==0 but when I added the check for Description it doesn't work.
if ((event.value == 0) && (this.getfield("DescriptionRow1").value.length == 0)) event.value = "";
Can anyone help me please? I am very new to JavaScript.
(I am using Acrobat version 9.4.0)
if ((event.value == 0) && (getField("DescriptionRow1").valueAsString === "")) event.value = "";