Skip to content

Enhancement: Conditional UI for Metadata #362

@estruyf

Description

@estruyf

Discussed in #357

Originally posted by bwklein June 13, 2022
I would like to show only the fields that are required based on some boolean or choice field selections.

For example, I have a 'Heading' partial that can either have text based title or a logo based heading.
I would like to allow the editor to choose if they want a text or logo based heading with a boolean choice like "Logo Heading?"

If true, then I would like to show them a Logo choice field and a string field for 'Classes' that they can pass in to style the logo. Essentially showing them a Field Group for the 'Logo' settings.

If false, then I would like to show the fieldgroup for the "Text" heading data.

Solution

{
	"title": "Logo Heading",
	"name": "logoHeading",
	"type": "string",
	"when": {
		"property": "heading",
		"operator": "eq",
		"value": true
	}
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions