I know I can do something like the following with my field and the when clause to only display it for entry in the panel if the Product equals shirt.
when:
product: shirt
I needed to change the Product field to be a checkbox (could change to multiselect if need to), and now the “when” option isn’t going to work.
Is there any other ways to display a field only if a value in a checkbox (or multiselect) is selected? I really don’t want to create different Blueprints for our users to select based on the combination of products they select as that can get overwhelming, so trying to come up with other options.
Hello @NicoleA and welcome to our forum!
Checkboxes and multiselect are the same sort of fields when it comes to how the values are stored, i.e. as a comma separated list. Therefore, these types of fields (currently) don’t work with the when
condition, because this condition requires a single value.
Is there any other way to do something like I am looking for without using the “when” condition?
I basically want to hide fields when they aren’t appropriate for the product selected. My only other though was to have a toggle field or something for each product if that worked and was the best option available.
At the moment, the when
option is still rather limited, I’m afraid. We are working on improvement, though, but that doesn’t help if you need a solution right now.
I’m not really convinced that adding a toggle field for each possible option makes sense, unless there are only two options.