Apologies in advance for the newbie question. I’m simply trying to setup a toggle field to allow users to select between ‘left’ and ‘right’. I’ve managed to customise the field to show a ‘right’ and ‘left’ arrow depending on the value, which is great, but I’d also like to customise the label — eg, so it displays “left” for true and “right” for false.
It seems like I should just be able to select the label values by using the ‘Label On’ and ‘Label Off’ fields under Display → Boolean settings for the field. Whatever I enter in those fields, however, never shows. It gets overridden by whatever value I entered in the ‘Labe’ field under the Interface settings for the field — which is a required field, so I cannot leave blank.
I’ve tried going through the official docs and googling, but cannot find anything… I feel like this should be something really easy, and that I’m overlooking something obvious. Any guidance would be greatly appreciated!
Ok, I worked out how to do it, so posting here in case anyone else gets stuck.
The ‘Conditions’ settings for a field can dynamically change both the ‘Interface’ and ‘Display’ settings of a field — including the label. In order to get the functionality I wanted, I just had to setup 2 conditions/rules: one to display ‘left’ on the interface when the field is ‘true’, and another to display ‘right’ when the field is ‘false’. Done!
Also useful to know that it works on other field types, too — eg., with the ‘Switcher’ extension from the Marketplace.
The settings under the “Display” section affect how the value is displayed when viewed in the columns on the Collection screen, not when you’re editing the item itself. I agree it’s a bit rubbish as it is.
Thank you for clarifying that — the docs don’t make that clear at all…
I guess in this case I might have to switch to another kind of field altogether, then — like a dropdown or radio buttons — in order to be able to get the ‘left’ and ‘right’ options displaying in the interface, right?