I found this nice example which shows how you can create a radio button layout on Node red dashboard.
But i would like to know how to customize it so that you can have all the options in one single line.
Here is my flow
[
{
"id": "edc9a4910322d22a",
"type": "function",
"z": "2487b22980f7aa41",
"name": "",
"func": "var arr =[\"By Location\", \"By State\", \"By Comm Link\"];\nmsg.payload = arr;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1240,
"y": 880,
"wires": [
[
"ba7351e7e0c488da"
]
]
},
{
"id": "9786d5641eb6104e",
"type": "inject",
"z": "2487b22980f7aa41",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1070,
"y": 880,
"wires": [
[
"edc9a4910322d22a"
]
]
},
{
"id": "55de9b4cc6b78e38",
"type": "debug",
"z": "2487b22980f7aa41",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1610,
"y": 880,
"wires": []
},
{
"id": "ba7351e7e0c488da",
"type": "ui_template",
"z": "2487b22980f7aa41",
"group": "fee791eccb9591fd",
"name": "Radio Buttons",
"order": 6,
"width": 3,
"height": 2,
"format": "<div style=\"margin: 0 0 0 -30px;\">\n <ul>\n <li ng-repeat=\"option in msg.payload track by $index\" \n style=\"list-style-type: none;\">\n <label>\n <input type=\"radio\" ng-click=\"send({payload:option})\" value=\"{{option}}\" name=\"data\" />{{option}}\n </label>\n </li>\n </ul>\n</div>",
"storeOutMessages": false,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 1420,
"y": 880,
"wires": [
[
"55de9b4cc6b78e38"
]
]
},
{
"id": "fee791eccb9591fd",
"type": "ui_group",
"name": "Remote Shops",
"tab": "5dfc90d0ba2ae355",
"order": 1,
"disp": false,
"width": 30,
"collapse": false,
"className": ""
},
{
"id": "5dfc90d0ba2ae355",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"order": 0,
"disabled": false,
"hidden": false
}
]