Skip to content

Conditions and calculations

Use Conditions after the ordinary form flow works. Each condition should have one documented purpose and a preview test for every outcome.

Rule model (v2)

The editor stores rules as JSON in the form document. A rule has an enabled state, a condition list, a match mode, and one or more actions. AND requires every statement to match; OR requires at least one. Conditions can compare a field with a literal value (targetValue) or with another field (targetField). Composite controls may be referenced by dotted names such as fullName.First.

Supported operators are equals, not equals, contains, does not contain, starts with, does not start with, ends with, does not end with, less/greater than (including inclusive variants), is empty, and is filled. Use numeric operators only with numeric-compatible values. Empty/filled tests do not need a comparison value.

Available actions

  • Show or Hide field — changes whether a field is visible when specified logic is true.
  • Update or Calculate field — computes or sets a field value from a formula or condition.
  • Set redirect URL — chooses the destination after a form is submitted.
  • Neural Auto Filler — fills a form field through a configured Neural Network.
  • Default Values — sets defaults for form fields.

Show/hide: one or many targets

Use Show or Hide for one target field. Use Show multiple or Hide multiple when the same condition controls a group of already-existing fields. Multiple actions do not create fields at runtime. For a progressive form, prefer separate simple rules (for example, reveal address, then reveal delivery instructions) so each step can be tested independently. If two rules target the same field, document their precedence and test conflicting answers; do not assume the last rule wins.

Calculated and copied fields

Update or Calculate field supports three formula actions:

  • Copy copies one source field to one target.
  • Copy multiple combines literal text and several source fields into one target.
  • Calculate evaluates a formula and writes the result to one target.

Formulas reference fields with braces, for example {quantity} * {unit_price}. Common helpers include IF, SWITCH, CONCAT, INT, FLOAT, VALUE, FORMAT_NUMBER, DATE, AGGREGATE, and VISIBLE. Keep the target distinct from its sources to avoid circular updates; test empty, invalid, boundary, and decimal inputs. A calculated value is not a security boundary and should be rechecked server-side before payments or other sensitive actions.

Defaults, redirect, and Neural Auto Filler

Default Values is unconditional prefill: map real field names to scalar values. It is applied before the respondent edits the form; it does not overwrite a deliberate answer unless the rule is configured to run again.

Set redirect URL changes the post-submit destination. Use an absolute HTTPS URL that you control, confirm the destination is safe, and test success and validation-error paths. Redirect behavior is separate from field visibility/formulas.

Neural Auto Filler uses a configured Neural Network to derive a field value. It requires an available model and compatible source/target fields; treat the output as untrusted, show it for review where appropriate, and test the no-model/error path.

Use Edit conditions to review the current form’s condition list.

Safe sequence

  1. Give every referenced field a stable, unique internal name.
  2. Add one condition.
  3. Preview both the condition-true and condition-false paths.
  4. Confirm required fields do not block an inapplicable path.
  5. Record the purpose, trigger, dependent fields, and test cases before adding another condition.

Build better forms with AbcSubmit.