Noob question on forms

Greetings All, new to this forum and somewhat a beginner with Node Red.

I would like to create a UI with fields that the user must fill-in, then compute a resulting value based on the filled-in fields, either automatically or after the user has pressed a "compute" button.

What I am wondering is what the proper way (and not too complex) is to store the values until the compute button is pressed? Should I use context variables or maybe a DB?

Thank you

Context probably easiest, though you may be able to hold them in a join node until a complete / submit is sent - and then process them all in one go to create the result.

Ah thank you, I did not know the join node. I will try it out right away

Quick feedback on how I solved my problem in the end: the join node proved unreliable (maybe I did not implement it right), some sort of timing or cash issue within the browser, not sure.
Anyways, I eventually used the context approach as described here: A guide to understanding 'Persistent Context'

Everytime a field in my form is altered it stores the new value in a context variable which is saved on disk. At any point in time I can then use context data to compute whatever. Very handy.

1 Like