0 Replies Latest reply on May 4, 2017 12:29 PM by jenniferg87642099

    Java Script for Rounding Down in Acrobat Pro

    jenniferg87642099

      I have a Quantity field,     a Free Goods field,    and a field set to a value of .5.

       

      The deal in Buy 2 get 1 free.

       

      I want the free goods field to auto-populate, so I have it to calculate the sum of Quantity field and the .5 field.

      I need to validate the Free Goods field so that it always rounds DOWN to the nearest whole number, so (for example)

           if 3 items are ordered 1 item is free, not 2 (which is what the field wants to default to with the validation set to be a number with no decimals)

           if they order 4, they get 2 free, 5 gets you 2 free, etc

       

      I am not a coder, how would the code be written to accomplish this?

       

      Thanks.