A simple plugin that shows or hides one or more target fields in the record editor based on the value of a boolean or string field.
The plugin registers a manual field addon called Conditional fields that can be attached to a boolean or string field. When the field's value changes, the addon calls ctx.toggleField to show/hide the configured target fields. Localized source/target fields are handled correctly: if the trigger field is localized the toggle is per-locale, otherwise all locales of the target are toggled together.
Attach the addon to a boolean (checkbox) field. The configuration options are:
Attach the addon to a string field — most useful when the field is configured as a select (dropdown) with predefined options. The configuration options are:
For example, if your string field has options cat, dog, and fish, and you want to show a breed field only for cat and dog, you would enter cat, dog.