Hi,
I use a function node which goes through an object in flow context to build msg.ui_update, to populate dropdowns in a ui-form node.
It seems to work fine for the different drop-downs, but the dropdown options don't come in, the drop-down remain empty.....
I check the documentation on https://dashboard.flowfuse.com/nodes/widgets/ui-form.html , but it does not help.
Here is a sample of the code is someone interested !
[
{
"id": "16937eb7c2e1bb35",
"type": "inject",
"z": "9b46d347b64347c3",
"name": "",
"props": [
{
"p": "ui_update",
"v": "{\"options\":[{\"type\":\"dropdown\",\"label\":\"SOURCE-1\",\"key\":\"input\"},{\"type\":\"dropdown\",\"label\":\"SOURCE-2\",\"key\":\"input\"}],\"dropdownOptions\":[{\"dropdown\":\"SOURCE-1\",\"value\":\"0\",\"label\":\"INPUT 1\"},{\"dropdown\":\"SOURCE-1\",\"value\":\"1\",\"label\":\"INPUT 2\"},{\"dropdown\":\"SOURCE-1\",\"value\":\"2\",\"label\":\"INPUT 3\"},{\"dropdown\":\"SOURCE-1\",\"value\":\"3\",\"label\":\"INPUT 4\"},{\"dropdown\":\"SOURCE-1\",\"value\":\"4\",\"label\":\"INPUT 5\"},{\"dropdown\":\"SOURCE-1\",\"value\":\"5\",\"label\":\"INPUT 6\"},{\"dropdown\":\"SOURCE-1\",\"value\":\"6\",\"label\":\"INPUT 7\"},{\"dropdown\":\"SOURCE-1\",\"value\":\"7\",\"label\":\"INPUT 8\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"0\",\"label\":\"INPUT 1\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"1\",\"label\":\"INPUT 2\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"2\",\"label\":\"INPUT 3\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"3\",\"label\":\"INPUT 4\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"4\",\"label\":\"INPUT 5\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"5\",\"label\":\"INPUT 6\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"6\",\"label\":\"INPUT 7\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"7\",\"label\":\"INPUT 8\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"8\",\"label\":\"INPUT 9\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"9\",\"label\":\"INPUT 10\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"10\",\"label\":\"INPUT 11\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"11\",\"label\":\"INPUT 12\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"12\",\"label\":\"INPUT 13\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"13\",\"label\":\"INPUT 14\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"14\",\"label\":\"INPUT 15\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"15\",\"label\":\"APPS\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"16\",\"label\":\"INPUT 17\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"17\",\"label\":\"INPUT 18\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"18\",\"label\":\"INPUT 19\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"19\",\"label\":\"INPUT 20\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"20\",\"label\":\"INPUT 21\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"21\",\"label\":\"INPUT 22\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"22\",\"label\":\"INPUT 23\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"23\",\"label\":\"INPUT 24\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"24\",\"label\":\"INPUT 25\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"25\",\"label\":\"INPUT 26\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"26\",\"label\":\"INPUT 27\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"27\",\"label\":\"INPUT 28\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"28\",\"label\":\"INPUT 29\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"29\",\"label\":\"INPUT 30\"},{\"dropdown\":\"SOURCE-2\",\"value\":\"30\",\"label\":\"INPUT 31\"}]}",
"vt": "json"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 1950,
"y": 440,
"wires": [
[
"07ad6c9204241396"
]
]
},
{
"id": "07ad6c9204241396",
"type": "ui-form",
"z": "9b46d347b64347c3",
"name": "",
"group": "985c4654f996d0a1",
"label": "",
"order": 7,
"width": 0,
"height": 0,
"options": [
{
"label": "test",
"key": "test",
"type": "text",
"required": false,
"rows": null
}
],
"formValue": {
"test": ""
},
"payload": "",
"submit": "submit",
"cancel": "clear",
"resetOnSubmit": true,
"topic": "topic",
"topicType": "msg",
"splitLayout": true,
"className": "",
"passthru": false,
"dropdownOptions": [],
"x": 2110,
"y": 440,
"wires": [
[]
]
},
{
"id": "985c4654f996d0a1",
"type": "ui-group",
"name": "Input Names",
"page": "dce5e4e69c4c3fd0",
"width": 7,
"height": "1",
"order": 1,
"showTitle": true,
"className": "",
"visible": "true",
"disabled": "false",
"groupType": "default"
},
{
"id": "dce5e4e69c4c3fd0",
"type": "ui-page",
"name": "Real Auto Tricaster",
"ui": "cb79bc4520925e32",
"path": "/TCautoreal",
"icon": "home",
"layout": "grid",
"theme": "0d92c765bfad87e6",
"breakpoints": [
{
"name": "Default",
"px": "0",
"cols": "3"
},
{
"name": "Tablet",
"px": "576",
"cols": "6"
},
{
"name": "Small Desktop",
"px": "768",
"cols": "9"
},
{
"name": "Desktop",
"px": "1024",
"cols": "12"
}
],
"order": 2,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "cb79bc4520925e32",
"type": "ui-base",
"name": "My UI",
"path": "/dashboard",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control"
],
"showPathInSidebar": false
},
{
"id": "0d92c765bfad87e6",
"type": "ui-theme",
"name": "Basic Blue Theme",
"colors": {
"surface": "#4d58ff",
"primary": "#0094ce",
"bgPage": "#eeeeee",
"groupBg": "#ffffff",
"groupOutline": "#cccccc"
},
"sizes": {
"pagePadding": "12px",
"groupGap": "12px",
"groupBorderRadius": "4px",
"widgetGap": "12px",
"density": "default"
}
}
]
Thanks !