Conditional and Logic Capabilities

Conditional and Logic Capabilities

Conditional and logic settings allow forms to be dynamic — showing, hiding, enabling, or requiring fields based on user input. This ensures respondents only see fields that are relevant to them.

Conditional Logic

You can control when a field appears by setting conditional rules:

  1. Open the Form Editor.
  2. Select a field.
  3. Go to the Conditional tab in the field settings.
  4. Choose how the field behaves:
    • Simple Conditional: Show/hide a field based on the value of another field.
      • Example: Show “Please specify” only if “Other” is selected.
    • Advanced Conditional (Custom JavaScript): Add complex conditions.

Example:

show = (data.age >= 65);

 (This field only shows if the user’s age is 65 or older.)

Logic Actions

Logic settings let you define actions that happen when conditions are met.

  1. In the field settings, go to the Logic tab.
  2. Add a new Logic and Action.

    • Triggers: Events that start the logic (e.g., when a field changes).
    • Actions: What happens (e.g., set value, disable field, require field).

Best Practices

  • Use conditional logic to keep forms short and user-friendly.
  • Use logic actions to automate repetitive tasks and reduce errors.
  • Test thoroughly to make sure conditions work as expected across all scenarios.

What’s Next?