Let's take the form we created before, in its present state, and modify some details to enable calculations and see how we can receive the command in a mail.
The first thing we will need for our calculation is the unique name for each field. Names can be set in the Field Properties window of the PP. For easy remembering let's name them by their column name and row number. The first field of the first column will be Ref1, the price of the same row will be Price 1, and then Qty1 and Subtotal1. The next row will be Ref2, Price 2, and so on.
The first calculation must be done at the end of each row. Select the first Subtotal field and display its properties by double-clicking on it.
Specify that it is Read Only in the first tab and then go to the Calculate tab.
Activate Custom calculation script, and click on the Edit button. In the editing window, enter the following:
this.getField('Subtotal1').value=this.getField('Price1').value*this.getField(...