Hi I am fairly new to scripting, and I have created a form that is used both as a fillable PDF and printed out. It is a decklist and I want to be able to total the fileds for each specific type of card so it displays the toal in another field and then add those fields for a deck total. I can easily accomplish this using the built in Sum function in Acrobat X but when the list is printed blank to be used by players at an event the zeros print in the total fields and that confuses younger players.
I would like to use a custom calculation script that totals the fields and also checks the total, and if it is zero changes the font color to white.
Any help would be appreciated.
Text properties> format >custom > custom format script> place bellow code
if(event.value <= 0)
event.value = "";
event.target.textColor = color.white;
event.target.textColor = color.black;
Or you can place bellow code in validation.
if (event.value == 0) event.value = '';
Thank you that worked perfectly.