Here are some steps to take if you need to do some basic calculations within your document or other settings in Formstack Documents. For example, you have created an order form, but you need to tack on an additional processing fee that is not calculated by your form.
Here are some examples of some basic calculations. These simply print the result:
- {($Variable1*$Variable2)|number_format:2}
- {$Variable1+$Variable2}
If you need to save the values for later, you can use the assign function:
- {$Variable3 = $Variable1+$Variable2}
- {$Total = $Subtotal + $Shipping + $Tax}
- {$Discount = ($Subtotal * 0.25)|number_format:2}
- {$Percent = (100 * $Wins / $TotalGames)|number_format:2}
For more information on the mathematical calculations you can do within your documents, check out http://www.smarty.net/docs/en/language.math.tpl