node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

The Dropdown elements of the form node cannot be specified by the input Value

Open SXlaowang opened this issue 2 months ago • 5 comments

Current Behavior

The input content of Dropdown elements in the form node will be displayed as text errors. Even if I input the Value in the Dropdown options of elements, the corresponding Label will not be displayed. And the dropped node does not have this problem.

Expected Behavior

No response

Steps To Reproduce

No response

Environment

  • Dashboard version:
  • Node-RED version:
  • Node.js version:
  • npm version:
  • Platform/OS:
  • Browser:

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

SXlaowang avatar Oct 16 '25 20:10 SXlaowang

Can you post a simple flow showing the problem please?

colinl avatar Oct 16 '25 20:10 colinl

Can you post a simple flow showing the problem please?

[ { "id": "9bf4425bc9b2c893", "type": "inject", "z": "d55c3a4a102a1d02", "name": "", "props": [ { "p": "payload.aName", "v": "1", "vt": "num" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 330, "y": 240, "wires": [ [ "38ed8a5cddba6384" ] ] }, { "id": "38ed8a5cddba6384", "type": "ui-form", "z": "d55c3a4a102a1d02", "name": "", "group": "497106faf38a5190", "label": "", "order": 1, "width": 0, "height": 0, "options": [ { "label": "aLabel", "key": "aName", "type": "dropdown", "required": false, "rows": null } ], "formValue": { "aName": "" }, "payload": "", "submit": "submit", "cancel": "clear", "resetOnSubmit": true, "topic": "topic", "topicType": "msg", "splitLayout": "", "className": "", "passthru": false, "dropdownOptions": [ { "dropdown": "aName", "value": "1", "label": "abc" }, { "dropdown": "aName", "value": "2", "label": "def" } ], "x": 530, "y": 240, "wires": [ [ "93a7f5bace5ac481" ] ] }, { "id": "93a7f5bace5ac481", "type": "debug", "z": "d55c3a4a102a1d02", "name": "debug 9", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 700, "y": 240, "wires": [] }, { "id": "8078b7ee175b1c6e", "type": "inject", "z": "d55c3a4a102a1d02", "name": "", "props": [ { "p": "payload.aName", "v": "2", "vt": "num" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 330, "y": 300, "wires": [ [ "38ed8a5cddba6384" ] ] }, { "id": "497106faf38a5190", "type": "ui-group", "name": "Button Groups", "page": "22b5519aa675ad88", "width": "6", "height": "1", "order": 2, "showTitle": true, "className": "", "visible": "true", "disabled": "false" }, { "id": "22b5519aa675ad88", "type": "ui-page", "name": "Active Development", "ui": "75c7e37bfbe66366", "path": "/active-development", "icon": "forum", "layout": "grid", "theme": "129e99574def90a3", "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": "75c7e37bfbe66366", "type": "ui-base", "name": "board", "path": "/dashboard", "appIcon": "file://logo.png", "includeClientData": false, "acceptsClientConfig": [], "showPathInSidebar": false, "headerContent": "page", "navigationStyle": "default", "titleBarStyle": "fixed", "showReconnectNotification": true, "notificationDisplayTime": 1, "showDisconnectNotification": true, "allowInstall": false }, { "id": "129e99574def90a3", "type": "ui-theme", "name": "Custom Theme", "colors": { "surface": "#000000", "primary": "#ff4000", "bgPage": "#f0f0f0", "groupBg": "#ffffff", "groupOutline": "#d9d9d9" }, "sizes": { "pagePadding": "24px", "groupGap": "12px", "groupBorderRadius": "9px", "widgetGap": "6px", "density": "default" } } ]

SXlaowang avatar Oct 16 '25 20:10 SXlaowang

You have to send string 1 or 2, not number.

colinl avatar Oct 16 '25 21:10 colinl

You have to send string 1 or 2, not number.

Thank you, this is indeed effective. Thank you for your help. If possible, I hope it can be included in the documentation to help more people.

SXlaowang avatar Oct 16 '25 21:10 SXlaowang

I suppose that it did not occur to the developer that someone might send a number. It does not need to be a number in the config. Could you close this issue please if all is well.

colinl avatar Oct 17 '25 08:10 colinl