5 Replies Latest reply on Feb 18, 2015 11:19 AM by garyh82953607

    Custom calculation script problems with Acrobat X form ~ newb

    garyh82953607

      I could use a little help with a formula I'd like to use to calculate shipping costs. They are $4.63 for the first item and .25 for each additional item. This works; ((Quantotal - 1) * .25) + 4.63

      But runs wonky when there are no items in the quantity total. I am guessing a conditional statement that checks for 0 is in the making, but not not from these fingers.

       

      My effort looked like this:

      var a=this getField("Quantotal");

      var b=this getField("Shippingtotal");

      if(a>0)then(b=((Quantotal - 1) * .25) + 4.63)endif;

       

      Thanks for replies, thoughts and awesome code snippets