You don't need to. There's a built-in option in the Calculate tab that
allows you to easily set up simple calculations, set as a product and a
sum. So select the former for the SubTotal fields and then select the
relevant fields from the list, and for the grand Total select a sum of the
On Mon, Nov 17, 2014 at 3:39 AM, email@example.com <
Any time a series of fields will subjected to the same script, you should think about a field naming structure that can make you selecting fields easier or make the form scalable.
There are 3 calculation options on the fields' properties Calculation tab.
1. Select operation and field names.
2. Simplified field notation.
Thanks for your response. I have 2 quantities and 2 Unit price for each code, I know a simple sum in calculation it works for 1 unit price and quantity. Can you please let me know how to do it? One of the expert sent m this:
//change field names as needed
var qt1 = this.getField("qt1").value;
var up1 = this.getField("up1").value;
var qt2 = this.getField("qt2").value;
var up2 = this.getField("up2").value;
event.value = (qt1 * up1) + (qt2 * up2);
I put this in total text field (calculation tab , Custom script) , but it did not worked.
I appreciate it if anyone can help or give me suggestion.
The script seems fine. What didn't work with it, exactly?