Extended conditional field options

#1

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
Conditional field for files field
#2

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.

#3

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

#4

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?

#5

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.

#6

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

But lets open an issue.

#7

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.

#8

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