Hope I am posting to the right place.
I am creating a form in Acrobat that needs a little Javascript, but I don't know anything about JavaScript so any help will be appreciated.
In the form there are for separate price fields and a field that automatically fills in an average price for all of them. The problem is not all 4 price fields are going to be filled out in every instance which ruins the average. I need a script the will average the Price fields that have a value.
I was thinking I could create an invisible field that simply state that
If (Price) > 0 then set value to 1 (what would this look like in JavaScript?)
I could do that for each of the 4 price fields then in another invisible field count them and use that sum to divide the Total cost to get the average.
Thanks in advance for any help!