Hi,
The below code was working until I changed from using the “group” parameter type to group[]. I can choose an option but nothing after that works anymore.
"gridSquare": {
"type": "group[]",
"label": "Squares",
"itemLabel": "{{index}}. {{blockType}}",
"params": {
"blockType": {
"type": "choose",
"label": "Block Type",
"options": [
{ "value": "image", "label": "Image" },
{ "value": "stat", "label": "Stat" },
{ "value": "icon", "label": "Icon" }
]
},
"image": {
"type": "image",
"when": "eq(blockType, 'image')"
},
"background": {
"type": "color",
"label": "Background Colour",
"initial": "#4A6DFF",
"when": "eq(blockType, 'stat')"
},
"textColour": {
"type": "color",
"label": "Text Colour",
"initial": "#ffffff",
"when": "eq(blockType, 'stat')"
},
"statistic": {
"type": "text",
"label": "Statistic",
"initial": "19%",
"when": "eq(blockType, 'stat')"
},
"description": {
"type": "text",
"label": "Statistic Description",
"initial": "Staff in 'earn and learn' roles",
"when": "eq(blockType, 'stat')"
}
},
"icon": {
"type": "image",
"label": "Icon",
"initital": "/wp-content/themes/pro-child/assets/img/Icon_marque.svg",
"when": "eq(blockType, 'icon')"
}
}
Thanks