Kirby allows me to conditionally show a field using the when
property, as documented here: Fields | Kirby CMS
I can even apply multiple conditions, like this:
fields:
toggle:
type: toggle
category:
type: select
options:
- A
- B
- C
- D
text:
type: text
when:
toggle: true
category: B
Here, for the text field to be shown, all conditions must be met (toggle
is true
, category
is A
).
But what if I want to show the field when the category is A
OR B
(but not when it is C
or D
)? I would need an OR
mechanism, which Iām not finding in the documentation. Something like this:
fields:
toggle:
type: toggle
category:
type: select
options:
- A
- B
- C
- D
text:
type: text
when:
toggle: true
or:
category: A
category: B
Is this possible?
If not, how are people working around this limitation? Are programmable blueprints my only option here?