Hello everyone,
I am working on my content forms and need to create conditional fields.
As I could see here, Using fields | Kirby CMS I can use when and test the value of another field.
Pretty cool.
But in my case I have a field 1 with the options a, b, c, d …
Another field 2 should appear only if the value of field 1 is not a.
I noticed that you can combine multiple conditions (which seem to combine with the AND operator), so I tried:
when:
field1: b
field1: c
field1: d
It doesn’t work because my logic is based on the OR operator.
I also tried the negation:
when:
field1: !a
commas:
when:
field1: b, c, d
and an array:
when:
field1:
- b
- c
- d
Neither of these ideas was in the documentation so i didn’t expect this to work.
Having said that, do you think that it might be a good idea to improve this property?
Do I have to turn to a bit of js to get my way around or is there something I’m missing?
Edit : By the way, version 3.5 with its layouts and blocks f*ck**g rocks!