Learn & Support · Forms and logic
Calculate a total as people type
Quantity times price, worked out on the form as people fill it in.
Watch the presentationA 1:45 video; captions under CC. The steps are below too.
Add a number field
In UI & Data, create a form (here, Cupcake Order) and choose Fields. Under Input, choose number. Open the new field, choose Settings, label it Quantity, and choose Submit.
Add the money fields
For money, choose currency the same way: one labeled Price each, and one labeled Total. Currency fields show a dollar sign and two decimals.
Write the logic
Choose Form Logic, then Write as text. Under on load, set Price each to 3.50; under on change Quantity, set Total to Quantity times Price each. Names with spaces go in quotes.
Check and apply
Choose Check to make sure it reads right, then Apply to save it. Prefer not to type? Click to build makes the same logic from menus.
Open the form
Close Form Logic, choose Sharing, then Open Link. The form opens on its own page with Price each already filled in.
Watch the total
Type a quantity and the total is worked out: 12 at $3.50 is $42.00. Change the quantity, and the total follows.
Go deeper
Number fields
Calculate prices, totals, margins and payments the moment a value changes, with no spreadsheet.
Take the tour →Jade: logic meets love
Build calculations, decisions and actions from lists, with every function explained as you go.
Take the tour →Jade Functions
Text, number, date, money, validation, AI and action functions, each explained in plain words.
Take the tour →