Extended conditional field options

I’ve setup a radio field with 4 options. I want to toggle a field if any of 3 of the options are set, but not on the forth. The instructions say that you can set multiple conditions, but they must all be true to toggle the field. This means it cant ever work with radios. hope fully that possibility will come. Is there a work around?

This is what I have (but doesn’t work)…

herotype:
  label:        Hero Type
  type:         radio
  columns:      4
  options:
    color:      Color
    image:      Single Image
    slides:     Slides
    video:      Video
tinthero:
  label:        Tint Hero
  type:         toggle
  width:        1/2
  when:
    herotype:   image
    herotype:   slides
    herotype:   video

Guess you have to wait a bit for this to be supported. We definitely need something like that, maybe even using query language instead of typing three options.

I thought as much. Yes… even a comma separated list would do.

Sorry for hooking into this topic… Just did my first tries with the conditional fields and this is huge. love it.
But how can I toggle sections?

If I insert when:on a section, it doesn’t work.

Is there a way to hide for example a files section?

A section is not a field, and the conditional fields only work with - fields.

But hiding sections sounds like a good idea as well, maybe you want to create an issue in the ideas repo.

Make sense… but a user doesn’t make a distinction between fields and sections…

But lets open an issue.

Had the same problem as well. So its nice that you can make AND conditions with this, but a OR condition is of the same use.

We never said it would not be. The current limitation to AND is simply one of implementation. With 3.1 it was more important to get out a first working solution to see how stable this one would prove itself and later build on it. You might like to know that OR conditions are on the roadmap for 3.2: https://roadmap.getkirby.com

Is it implemented now? Also looking for solution to show one field, when for example 5 of 6 options are set.

No, all the idea issues relating to conditional fields are still open.

(Somehow, we should probably unify these as there seem to be quite a few overlaps, what do you think @distantnative?)

2 Likes