Skip to content
v2.7 (latest)

Recalculate on input change ​

This guide explains how to use On change actions on an Input element to automatically trigger a recalculation whenever the user changes a value — no button required. This is ideal for live, reactive forms where the output should always reflect the current input.

Prerequisite: A Calculator ruleset with inputs a (Number) and b (Number), and a rule sum = a + b. A form with two Input elements (bound to a and b) and one Output element (bound to sum).

The basic setup — adding a Calculate button that runs the ruleset — is already covered in detail in Create a Form. If you haven't done that yet, start there.

Adding On change actions to an Input element ​

  1. Open your form and click the First input element (bound to a) to expand it
  2. Scroll down to On change actions and click +
  3. Select Execute Ruleset
  4. Repeat steps 1–3 for the Second input element (bound to b)
  5. Save the Ruleset

When you type a value in either input field, the sum output updates immediately — without clicking a button.

Conditional recalculation with Set property ​

You can also use On change actions to reset a downstream field when an upstream value changes. For example, when the user changes input a, clear the value of b first:

  1. Click the First input element (bound to a)
  2. Under On change actions, click + → select Set global variable
  3. Set Path to b
  4. Set Value to 0
  5. Add a second action → Execute Ruleset
  6. Save the Ruleset

Now when a changes, b is reset before the ruleset recalculates. This prevents stale combinations.