GCBGutenberg
Control Blocks
Buy

Building blocks

Conditional logic

Conditional logic (hide a field unless its rules pass)

Every control supports a conditionalLogic block that hides it unless its rules pass against sibling attribute values:

JSON
{
  "type": "textarea",
  "attributeKey": "extra_notes",
  "label": "Extra notes",
  "conditionalLogic": {
    "enabled": true,
    "operator": "and",
    "rules": [
      { "field": "show_extra", "operator": "==", "value": true },
      { "field": "count",      "operator": ">",  "value": 0 }
    ]
  }
}

Operators: ==, !=, >, <, >=, <=, contains (string), in (value-in-array). operator: "and" | "or" joins multiple rules; default is and. Rules can reference any other control in the same form (cross- panel is fine — useful for "show advanced field when upstream setting matches").