I'm not too familiar with setting up custom scripts and was wondering if anyone here might be able to help me. I am trying to calculate a discount value in a pricing form if the customer is applicable for a military/senior discount, but if the customer isn't applicable I want the field to calculate the total without factoring in a discount.
I took a screen shot and circled the fields that I'm concerned with in red. If anyone could help I would greatly appreciate it!
Let's assume the field names are "Subtotal", "Military Discount" and "Military Discount Amount".
You can use this code as the custom calculation script of the latter:
if (this.getField("Military Discount").value=="Yes") event.value = Number(this.getField("Subtotal").value) * 0.05; else event.value = "";