I have a product order form that I started to work with in Word then converted to pdf and used Acrobat 8's form recognition to finish. I tweeked the form to calculate totals, including sales tax only if the order was from someone in our state. In order to be more pci compliant, I decided to convert the credit card number to a bar code, but in order for our Point of Sale scanners to read it, it had to be a special kind of bar code that wasn't built into Acrobat, so on to LiveCycle. When I converted to LiveCycle most my simple calculations worked (qty * unit_price = total_price), but one other didn't and the sales tax one was commented out. I did get a notice when I converted it about some of the javasript needing to be updated... but I have no clue how to update it. The strange thing is that one of my simple calculations doesn't work and wasn't commented out. It takes the value of an item in a check list (i.e. the cost of shipping types) and puts the price in the form. The checklist works fine, but the calculation doesn't ever show up.
Here's the code I have for the sales tax calculation that worked in Acrobat (Thanks to gkaiseril for the help with this!):
var state = this.getField("State").value.toLowerCase(); var subt = this.getField("Subtotal").value; var rate = subt * .07; if (state == "ia") event.value = rate; else event.value = 0;
This is the code that LiveCycle converted for the Shipping field that is supposed to update based on the shipping type selected from a check list:
this.rawValue = Shipping_type.rawValue;
I need to present this form to co-workers tomorrow morning and would love to have the whole thing working by then! Any help is much appreciated!
George Kaiser