Closed activatedigital closed 3 months ago
ok, a little better layout with code block
{
"schema": {
"friends": {
"type": "array",
"items": {
"type": "object",
"title": "Friend",
"properties": {
"nick": {
"type": "string",
"title": "Nickname"
},
"animals": {
"type": "array",
"items": {
"type": "string",
"title": "Animal name"
}
}
}
}
}
},
"form": [
{
"type": "tabarray",
"items": {
"type": "section",
"legend": "{{idx}}. {{value}}",
"items": [
{
"type": "fieldset",
"title": "About",
"expandable": true,
"items": [
{
"key": "friends[].nick",
"valueInLegend": true
}
]
},
{
"type": "fieldset",
"title": "Animals",
"expandable": true,
"items": [
{
"type": "tabarray",
"items": [
{
"type": "section",
"legend": "{{idx}}. {{value}}",
"items": [
{
"key": "friends[].animals[]",
"valueInLegend": true
}
]
}
]
}
]
}
]
}
}
]
}
so you have a object with a name and an array of animals
and then you have an array of those
SO you should have a + which creates a new one of those with both fields.. a name and an array , and a new tab if we take out the form, we see this
so the problem is in the form if u condense it, you don't need fieldset if there aren't multiple fields..
{
"schema": {
"friends": {
"type": "array",
"items": {
"type": "object",
"title": "Friend",
"properties": {
"nick": {
"type": "string",
"title": "Nickname"
},
"animals": {
"type": "array",
"items": {
"type": "string",
"title": "Animal name"
}
}
}
}
}
},
"form": [
{
"type": "tabarray",
"items": {
"type": "section",
"legend": "{{idx}}. {{value}}",
"items": [
{
"key": "friends[].nick",
"valueInLegend": true
},
{
"type": "tabarray",
"title": "Animals",
"items": [
{
"type": "section",
"legend": "{{idx}}. {{value}}",
"items": [
{
"key": "friends[].animals[]",
"valueInLegend": true
}
]
}
]
}
]
}
}
]
}
this looks like this on initial open
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
any feedback, or can we close this issue?
no feedback, closing
Json:
{"schema":{"friends":{"type":"array","items":{"type":"object","title":"Friend","properties":{"nick":{"type":"string","title":"Nickname"},"animals":{"type":"array","items":{"type":"string","title":"Animal name"}}}}}},"form":[{"type":"tabarray","items":{"type":"section","legend":"{{idx}}. {{value}}","items":[{"type":"fieldset","title":"About","expandable":true,"items":[{"key":"friends[].nick","valueInLegend":true}]},{"type":"fieldset","title":"Animals","expandable":true,"items":[{"type":"tabarray","items":[{"type":"section","legend":"{{idx}}. {{value}}","items":[{"key":"friends[].animals[]","valueInLegend":true}]}]}]}]}}]}
Issue: