Hi there, I am creating a small tutorial for cockpit, so that the interns can work more easily with it.
While describing the Set field type, I stumbled in a problem (or maybe just lack of knowledge from my side).
I tried to create this field using the UI, where the value of the personal_id field would be displayed to represent this set.
The field was created and I added this entry:
But when I look at the list, it display the name of the field (or uses the value provided as a literal string), instead of the value of the field.
Is my configuration wrong somehow?
abernh
2
You’re very close. Just wrap your field names into {}
and it should display the correct value
{
"display": "{field1}",
"fields": [
{
"name": "field1",
"type": "text"
},
{
"name": "field2",
"type": "text"
}
]
}
via Renderer for set field in backend - #8 by artur
3 Likes
Thanks a lot, that did the trick, the interesting for me is that in a repeater you don’t need to use the curly braces.
When i try the config for the multiple set field from your answer i get {field1}, not field1 value
I’m using version 2.2.1, maybe something has changed in the syntax since your answer? Or am I doing something wrong?
Thank you in advance.
artur
5
Please try ${data.field1}
as a display field setting
Thanks a lot, it works. And why in this case it is necessary to write in this way? Is there any documentation about template syntax?