I am trying to conditionally display fields in the panel, depending on what checkboxes are checked in another field. This is what I have:
label: Product options
label: Physical price
label: Digital price
But this isn’t working - the price fields are not appearing when the checkboxes are checked. Is a different approach needed for checkboxes? The client needs to be able to choose either physical or digital, or both.
A checkboxes field is not an either/or field, so this won’t work, because it stores a comma-separated list of values.
For two options, where only one should be selected, use a radio field instead.
If the user should be able to select both, then the when option won’t work at the moment.
Understood, thanks for the quick answer.
In this instance a couple of toggles would work just as well, so I will use that approach instead.
when works with
The Documentation says yes, but there is no syntax hint…
I tried like this – but it is not working:
label: Available as print
label: Part of an edition
A toggle button always has the values true or false.
That works. Thanks!