Calculate a price or total
Use a number variable as a running total, show it with recall and charge it with a Payment question.
Every plan
- In Logic → Variables, add a variable such as
totalstarting at 0. - On each question that affects the price, add rules that Add to
total(for example, the answer is “Large” → add 12). - Show it with recall on a later screen: “Your total is {{var:total}}”.
- To charge it, add a Payment question and set Amount to From logic with
total.
Totals are in whole currency units: a total of 24.5 is charged as 24.50. The server works the total out again from the answers before charging, so it can't be changed in the browser.