Replies: 3 comments 5 replies
-
When the code is initially in the index.html file in which the links to the JavaScript file are written, then it works as expected, the only problem is to make it work in the newly added code through uib-element |
Beta Was this translation helpful? Give feedback.
-
Hi, at present, the zero-code features for user input relies on creating a form and using a button to send the form data back to Node-RED. Individual and fully dynamic inputs for So currently, create a form and use the send button to get the form data back into Node-RED. The zero-code example in the library has a form flow. To get something more dynamic, you would need to use a generated low-code msg. For example, you could use As an example. Here is a msg.payload input to a
The output from the
Which probably looks a bit horrendous to begin with. But remember that HTML is hierarchical so work through each section looking for Each of those children represents 1 input. Each input contains another And to enable a field to dynamically send back updates, you would need to change the
Which will fire the function to get the form data back to Node-RED every time the user changes the value. The You can do the changes either using a function node with JavaScript or using a change node. Use the output of the Here is an example flow snippet that illustrates all of the above.
Once you've got your head around the basics of manipulating the low-code config data, you will hopefully begin to see how you can create your own custom outputs. For example, if you want to have immediate outputs from all user inputs, you don't actually need to wrap everything in a form. |
Beta Was this translation helpful? Give feedback.
-
There are, of course, other ways to achieve this. You could write some front-end JavaScript in If you want an example of doing the processing in the browser though, let me know and I'll knock something up. |
Beta Was this translation helpful? Give feedback.
-
Good afternoon, I'm trying to figure out one question, since I'm new to programming, I don't know how to solve it. I am building a web page with blocks of html code using uib-element, I can form a page with three, four or more blocks. But when a block of code needs to perform a dynamic change, such as a slider that executes a JavaScript file, I can't get it to work dynamically. Please tell me where I can find out how to make JavaScript work in those blocks that were added via uib-element. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions