Hi,
I have Googeld, but cant find a example of how to manipulate the ui-form from a json or any input to it.
Can you manipulate the form fields from a input to it?
Thank you
Hi,
I have Googeld, but cant find a example of how to manipulate the ui-form from a json or any input to it.
Can you manipulate the form fields from a input to it?
Thank you
In what way?
What are you trying to achieve?
As far I know there is no way to change or populate fields of ui_form node via input messages. It is pretty much static. Probably for purpose.
The idea is to have 3 selection buttons manipulating the fields in the form.
Something like this?
If for values, then yes, you can change values for fields.
[{"id":"edc698bb.24c5b8","type":"ui_form","z":"d4ff3fe5.7e9e7","name":"","label":"","group":"a1b48177.63b91","order":4,"width":0,"height":0,"options":[{"label":"DEFAULT 1","value":"first","type":"text","required":true,"rows":null},{"label":"DEFAULT 2","value":"second","type":"text","required":false,"rows":null}],"formValue":{"first":"","second":""},"payload":"","submit":"submit","cancel":"cancel","topic":"topic","topicType":"msg","splitLayout":true,"x":400,"y":620,"wires":[[]]},{"id":"47e6a047.dea2f","type":"inject","z":"d4ff3fe5.7e9e7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"first\":\"CHANGED FIRST\",\"second\":\"CHANGED SECOND\"}","payloadType":"json","x":180,"y":620,"wires":[["edc698bb.24c5b8"]]},{"id":"a1b48177.63b91","type":"ui_group","name":"Default","tab":"c122ecdc.526d7","order":2,"disp":true,"width":"6","collapse":false},{"id":"c122ecdc.526d7","type":"ui_tab","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
That still doesnt say a lot TBF.
Do you expect the last "form" node to have dynamic fields added / removed / hidden / shown?
Do you expect the last "form" node to have dynamic payloads set?
Do you expect to adjust the labels of the last "form" node?
Probably best to say now - the form node is not 100% dynamic. If you want to build/add-to/adjust a dynamic form, then you will have to use something like the ui_template and DIY it.
I wanted to dynamic fields added / removed / hidden / shown and adjust the labels.
Seems a ui_template will have to be done.
Thanks for your input.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.