Skip to content
Open backoffice ↗

Designing forms · UMBRACO

Calculated fields

Choose numeric inputs, build a formula and verify its result.

Build a calculation

Add the calculator/calculated control from the palette. In its configuration, select the input fields and use the formula editor's supported operators and functions. Insert fields through the editor rather than guessing expression syntax.

For a booking estimate, use numeric quantity and unit_price inputs. Multiply them for the line total. Add separate subtotal, discount and tax steps when that makes the rule easier to review.

Define edge cases

Case Decide explicitly
An input is empty Treat it as zero or require the answer
A quantity is negative Reject it through numeric validation
A divisor is zero Show a useful validation result
Currency rounding Choose precision and the stage where rounding occurs
A hidden input changes Verify the intended calculation dependency

Test actual values such as 2 × 12.50 = 25.00 and verify the submitted result in Entries. Check recalculation after changing an earlier step.

Estimates and authoritative totals

A browser calculation is useful feedback. Payment charges and trusted financial values need server-controlled inputs and validation. Do not let a submitted price decide a real charge without a trusted server check.

The C# working example calculates a run variable after save. That example changes the confirmation message; it does not rewrite the stored answer or determine a payment charge. See C# scripting for the distinction.