Hi,
I created a simple javascript that will add four fields. The first time I did it I just added the text fields but if the first field was blank then I got a string of numbers instead of the calculation adding the blank field so I specified the fields as numbers.
My problem is that sometimes the form needs to be printed with no fields filled in so if the field is blank the total needs to stay blank. I figured out how to do that but then I realized that sometimes the field has a zero value and so the total needs to be zero.
Is there a way to add these fields and get a zero if the true value is a zero and for it to remain blank if there is no data in the form fields and to avoid the problem with text strings?
Thanks for your help.
event.value = Number(value1)+Number(value2)+Number(value3)+Number(value4)
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com