I'm in the process of designing a content type which has some fields that will be shown/hidden based on the value of other fields in the form using visibility conditions.
One of the fields will need to be shown based on the value of multiple fields but it seems you can only configure visibility based on a single dependent field (out of the box):
In the example above, my field is only shown when ShowButton1
is true
but I'd like it to depend on the value of an additional field.
Example of what I'd like to achieve, from K13:
The old visibility editor allowed us to build up complex expressions on the fly.
I've seen that it's possible to create a custom visibility condition which allows for multiple dependent fields: https://docs.kentico.com/developers-and-admins/customization/extend-the-administration-interface/ui-form-components/ui-form-component-visibility-conditions#visibility-conditions-with-field-dependencies
And this does work:
However I believe we would need to create a new visibility condition every time we encounter a need to depend on multiple field values which is a bit cumbersome.
Is there a way to achieve the same result but letting the CMS editor determine which fields the control depends on instead of overriding and hard coding the DependsOnFields
property?
Environment
- Xperience by Kentico version: [30.2.2]
- .NET version: [8]