Hi,
I want to build a Form for a schema where I have a main object which has a property called modules. This prop is an attribute which can have items of different types.
{
"definitions": {
"module_1": {
"type": "object",
"title": "contentitems_3",
"properties": {
"icon": {
"type": "string",
"enum": [
"navi_calendar"
],
"description": "das Kalendericon",
"default": "navi_calendar"
},
"title": {
"type": "string",
"description": "mein Kalender",
"default": "mein Kalender"
}
},
"required": [
]
},
"module_2": {
"type": "object",
"title": "timeterminal_2",
"properties": {
"icon": {
"type": "string",
"enum": [
"navi_timer"
],
"default": "navi_timer"
},
"orientation": {
"type": "string",
"enum": [
"landscape",
"portrait"
]
}
},
"required": [
]
}
},
"type": "object",
"properties": {
"modules": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/module_1"
},
{
"$ref": "#/definitions/module_2"
}
]
}
}
}
}
I am quite happy with how th result looks so far. But I need the list entry to show the “title” of the used module.
I tried getting this to work uisng a ui-schema without succes.
{
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/modules",
"options": {
"elementLabelProp": "title"
}
}
]
}
How can I make this work?
Thank you for taking time to respond ![]()
