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
}
}
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 } }