Skip to Content
FeaturesFormsCalculations

Calculations

Create calculated fields that automatically compute values from other form fields.

Form creation requires a Pro plan or higher. Form filling is available on all plans.

Basic Calculations

Sum

Add multiple field values:

  1. Create a text field for the result
  2. Open properties → Calculate tab
  3. Select Sum
  4. Choose the fields to sum

Product

Multiply field values:

  1. Create a result field
  2. Open properties → Calculate tab
  3. Select Product
  4. Choose the fields to multiply

Average

Calculate the average:

  1. Create a result field
  2. Open properties → Calculate tab
  3. Select Average
  4. Choose the fields to average

Minimum

Find the smallest value:

  1. Create a result field
  2. Open properties → Calculate tab
  3. Select Minimum
  4. Choose the fields to compare

Maximum

Find the largest value:

  1. Create a result field
  2. Open properties → Calculate tab
  3. Select Maximum
  4. Choose the fields to compare

Custom Calculations

For complex calculations, use JavaScript:

  1. Create a result field
  2. Open properties → Calculate tab
  3. Select Custom calculation script
  4. Write your JavaScript

Example: Percentage

var subtotal = this.getField("subtotal").value; var discount = this.getField("discount").value; event.value = subtotal * (discount / 100);

Example: Conditional

var quantity = this.getField("quantity").value; var price = this.getField("price").value; var discount = quantity > 10 ? 0.1 : 0; event.value = (quantity * price) * (1 - discount);

Calculation Order

When multiple fields have calculations:

  1. Click FormsCalculation Order
  2. View the order of calculations
  3. Drag to reorder if needed
  4. Calculations run top to bottom

Calculation order matters! If Field C depends on Field B, Field B must calculate first.

Number Formatting

Format calculated results:

  1. Open field properties → Format tab
  2. Select Number
  3. Set decimal places
  4. Choose currency symbol if needed
  5. Set separator style

Common Patterns

Invoice Total

Subtotal = Sum(Line1, Line2, Line3, ...) Tax = Subtotal * 0.08 Total = Subtotal + Tax

Order Form

Line Total = Quantity * Unit Price Order Total = Sum(all Line Totals) Shipping = (Order Total < 50) ? 5.99 : 0 Grand Total = Order Total + Shipping

Percentage Complete

Completed = Sum(completed checkboxes) Total = Count(all checkboxes) Percentage = (Completed / Total) * 100

Tips

  • Name fields descriptively for easier scripting
  • Test calculations with various inputs
  • Handle division by zero
  • Consider read-only for result fields
  • Document complex calculations

Next Steps

Last updated on