Do Arithmetic with Javascript on Forms

Note: Enter numbers in the "number of items" column. The form updates each time a change is made there.
  Item Name Num
of
items
Price per
Item
Total
1 $ $
2 $ $
3 $ $
Subtotal - $
Tax - $
Total - $