Hey All,
I have a web form on my dashboard that will collect a number. I want to constrain the numbers say from 65 - 85. How can I set up the form to work within this range?
Thanks
Rich
Hey All,
I have a web form on my dashboard that will collect a number. I want to constrain the numbers say from 65 - 85. How can I set up the form to work within this range?
Thanks
Rich
Use a switch node to check value if correct continue, else feed back to form or error text node with a message
e.g.
[{"id":"5be2da0bc11f5940","type":"change","z":"70632bcb2cd1f7fd","name":"","rules":[{"t":"set","p":"payload.number","pt":"msg","to":"65","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":320,"wires":[["be7294e0cb904cbe"]]},{"id":"40f0beb4ca5f43dc","type":"switch","z":"70632bcb2cd1f7fd","name":"","property":"payload.number","propertyType":"msg","rules":[{"t":"jsonata_exp","v":"$$.payload.number >=65 and $$.payload.number <= 85","vt":"jsonata"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":300,"wires":[["5b8be185820c4b7e","be7294e0cb904cbe"],["5be2da0bc11f5940"]]},{"id":"be7294e0cb904cbe","type":"ui_form","z":"70632bcb2cd1f7fd","name":"","label":"","group":"2d4fe667.28f8ba","order":0,"width":0,"height":0,"options":[{"label":"number","value":"number","type":"number","required":true,"rows":null}],"formValue":{"number":""},"payload":"","submit":"Submit","cancel":"Cancel","topic":"topic","topicType":"msg","splitLayout":false,"className":"","x":310,"y":260,"wires":[["40f0beb4ca5f43dc"]]},{"id":"5b8be185820c4b7e","type":"debug","z":"70632bcb2cd1f7fd","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":180,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"12","collapse":false,"className":""},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.