Skip to content

Group Conditions

Parapets edited this page May 21, 2026 · 1 revision

Group conditions allow you to enable or display different sets of Controls under different circumstances.

For all controls that appear under a certain set of conditions, assign them to a group ID (any positive integer).

{
  ... // (setting specification)
  "groupCondition": 1
}

If the condition should be determined by the state of a toggle control, simply assign a group ID to the groupControl property of the toggle control.

{
  "type": "toggle",
  ... // (setting specification)
  "groupControl": 1
}

If the condition should be determined by a stepper control, then the groupControl property is an array where each element corresponds to an option. Only the group ID corresponding to the selected option will be enabled. You may use null for any option that does not control a group.

{
  "type": "stepper",
  ... // (setting specification)
  "valueOptions": {
    "options": ["Option 1", "Option 2"]
  },
  "groupControl": [null, 1]
}

The display state of controls with groupCondition = 1 will now be controlled by the state of the control with groupControl = 1.

Advanced Conditions

More complex conditions can be created with the AND and OR operators.

The following are equivalent:

Display if groupControl 1 is true.

  • "groupCondition": 1
  • "groupCondition": [1]
  • "groupCondition": {"OR": [1]}

Display if groupControl 1 is false.

  • "groupCondition": {"NOT": 1}

Display if either groupControl 1 OR 2 is true.

  • "groupCondition": [1, 2]
  • "groupCondition": {"OR": [1, 2]}

Display if both groupControl 1 AND 2 are true.

  • "groupCondition": {"AND": [1, 2]}

Display if both groupControl 1 AND 2 are true and all others groupControls at this page false.

  • "groupCondition": {"ONLY": [1, 2]}