1 Reply Latest reply on Jul 1, 2015 7:19 PM by George_Johnson

    Action button programing.


      I need help programming an action button so that when clicked it will add a certain dollar amount to another field.

        • 1. Re: Action button programing.
          George_Johnson MVP & Adobe Community Professional

          Something like this should work as the Mouse Up script of the button:



          // Amount to add

          var amount = 2.72;


          // Field to add amount to

          var f = getField("cost");


          // Add the amount to the field, rounded to the nearest 100th

          f.value = util.printf("%.2f", +f.value + amount);



          This assumes the field you want to add the amount to is named "cost" and that has a numeric format.