Cannot display flow.set/flow.get message

I think @zenofmud was suggesting using the 'ui_form' so you could enter an email address and a message which would be output when you pressed the 'SUBMIT' button in the Dashboard.

a_email6

[{"id":"ddc41fb709236511","type":"ui_form","z":"f7434e0fe255a944","name":"Test Form","label":"","group":"1067c487a1fd6cfe","order":4,"width":0,"height":0,"options":[{"label":"Email","value":"Email","type":"email","required":true,"rows":null},{"label":"Message","value":"Message","type":"multiline","required":true,"rows":3}],"formValue":{"Email":"","Message":""},"payload":"","submit":"submit","cancel":"cancel","topic":"topic","topicType":"msg","splitLayout":"","className":"","x":160,"y":420,"wires":[["aa4de0d4366c8868"]]},{"id":"aa4de0d4366c8868","type":"debug","z":"f7434e0fe255a944","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":350,"y":420,"wires":[]},{"id":"1067c487a1fd6cfe","type":"ui_group","name":"Dashboard","tab":"85b1ab4efdea8f73","order":1,"disp":false,"width":"24","collapse":false,"className":""},{"id":"85b1ab4efdea8f73","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

When I press no, it has to store the email and that's it, and the variable I can handle as I wish.

Thank you very much!

Best regards

Not sure what 'no' means in "When I press no," ??
Also, do you mean 'store' or 'send' the email ??

Heres' a simple flow to 'store' the email address and message in flow variables and then retrieve them.

[{"id":"ddc41fb709236511","type":"ui_form","z":"f7434e0fe255a944","name":"Test Form","label":"","group":"1067c487a1fd6cfe","order":4,"width":"10","height":"4","options":[{"label":"Email","value":"email","type":"email","required":true,"rows":null},{"label":"Message","value":"message","type":"multiline","required":true,"rows":3}],"formValue":{"email":"","message":""},"payload":"","submit":"submit","cancel":"cancel","topic":"topic","topicType":"msg","splitLayout":"","className":"","x":160,"y":420,"wires":[["018e01bacfcd1776"]]},{"id":"aa4de0d4366c8868","type":"debug","z":"f7434e0fe255a944","name":"Debug saving","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":420,"wires":[]},{"id":"018e01bacfcd1776","type":"function","z":"f7434e0fe255a944","name":"store form inputs in flow variables","func":"flow.set('email', msg.payload.email);\nflow.set('message', msg.payload.message);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":420,"wires":[["aa4de0d4366c8868","f4c63f2fc8ef0716"]]},{"id":"f4c63f2fc8ef0716","type":"function","z":"f7434e0fe255a944","name":"get flow variables values","func":"msg.payload.email = flow.get('email');\nmsg.payload.message = flow.get('message');\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":540,"wires":[["5dfa20efb8592bea"]]},{"id":"5dfa20efb8592bea","type":"debug","z":"f7434e0fe255a944","name":"Debug retrieve","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":540,"wires":[]},{"id":"007bc34b4527a914","type":"comment","z":"f7434e0fe255a944","name":"Link needed to trigger the function node","info":"","x":400,"y":480,"wires":[]},{"id":"1067c487a1fd6cfe","type":"ui_group","name":"Dashboard","tab":"85b1ab4efdea8f73","order":1,"disp":false,"width":"24","collapse":false,"className":""},{"id":"85b1ab4efdea8f73","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

The above flow will place the email address in msg.payload.email
and the message in msg.payload.message

This is what the Form looks like on the Dashboard.
a_form_A

Here's a screenshot of the results in the named Debug nodes.

a_form_B

I don't want to press any buttons. I just want to enter an email and store it in a variable to a flow.set to a flow.get. I don't want to send a text or anything.

I want to store the variables in there

Just seen you have started another thread that looks exactly the same as this one.
I clearly do not understand the issue you are facing and will leave it to the more specialised people here.

Don't worry.

It's working! I was doing it right, I don't know why I didn't check it properly.

Thank you very much for your time, very kind.

Best regards

Pleased you have got it working. After going through all these steps with you, it would be useful if you could publish the flow that worked for you, so other people can learn from this experience.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.