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

Form - Add option to allow Drop Down as an element

Open SandeepAgarwal13 opened this issue 1 year ago • 3 comments

Description

Hi ,

The feature request is - to - Allow option to add DropDown as an element as part of Dashboard2 Form . User may define comma separated options - or send them via. msg.

Today the user needs to define this outside. Use Case Example :-

User has a mix of drops downs and text fields which he would like to define and based on the selection - Click Submit.

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

SandeepAgarwal13 avatar Apr 29 '24 10:04 SandeepAgarwal13

The biggest challenge here is the configuration UI within the Node-RED Editor, it'd be a nested editable list inside an editable list. The injection of msg.options or string defined JSON object could be a way to go as a first iteration though - thanks for the idea!

joepavitt avatar Apr 30 '24 09:04 joepavitt

The biggest challenge here is the configuration UI within the Node-RED Editor, it'd be a nested editable list inside an editable list. The injection of msg.options or string defined JSON object could be a way to go as a first iteration though

I need this to be able to migrate my dashboard to D2.
I have workaround the nested editable list, by adding a second editablelist on a second tabsheet. On the first tabsheet you specify the form options, and on the second tabsheet the dropdown options.

This allows me to change the key of a a dropdown in the first tabsheet. In that case the related dropdown options (on the second tabsheet) will become detached from the original dropdown key. Then you can link them to the new dropdown key.

Demo of this POC: dropdown_form

Which looks like this in the form on the dashboard:

form_dropdown_vue

The disadvantage is that all options for all dropdowns are in a single list, which is not very organized (in case of lots of dropdown options)...

But then at least we have something temporary, until somebody invents a fancy nested editableList. Any thoughts??

bartbutenaers avatar Aug 11 '24 20:08 bartbutenaers

I could add a dropdown on the top of the second tabsheet, where you can select from which dropwn the options need to be displayed...

bartbutenaers avatar Aug 11 '24 21:08 bartbutenaers