Possible to trigger flow from Template Node?

I have an input field with a phone number. Is it possible to use this number and trigger a flow with it?

A template node or a ui_template node?

assuming old dashboard and ui-template, i have a flow sample from forum, which gets input from the user and displays the result. this works after entering the details and on clicking the submit button. hope this is what you are expecting.

[{"id":"bf69ec07f90714eb","type":"ui_template","z":"f892482e98c74480","group":"feabd600.f71b28","name":"INPUT","order":2,"width":"24","height":"6","format":"<!DOCTYPE html>\n        <html>\n<h1>Input Screen</h1>\n<form ng-submit=\"send({payload: mymodel})\">\n    <TABLE BORDER=\"1\">\n        <TR>\n            <TD>Name</TD>\n            <TD ALIGN=\"left\"><INPUT ng-model=\"mymodel.fname\" TYPE=\"text\" SIZE=\"25\" NAME=\"fname\">\n            </TD>\n        </TR>\n        <TR>\n            <TD>Phone Number</TD>\n            <TD ALIGN=\"left\"><INPUT ng-model=\"mymodel.number\" TYPE=\"text\" SIZE=\"25\" NAME=\"phnnum\">\n            </TD>\n       </TR>\n        <TR>\n            <TD class=\"select\">Chose Vehicle\n            </TD>\n            <TD ALIGN=\"center\">\n        <select ng-model=\"mymodel.select\" >\n            <option value=\"volvo\">Volvo</option>\n            <option value=\"MG\">MG</option>\n            <option value=\"Mercedes\">Mercedes</option>\n            <option value=\"Audi\">Audi</option>\n            <option value=\"BMW\">BMW</option>\n       </select>\n            </TD>\n        </TR>\n        <TR>\n            <TD><INPUT TYPE=\"submit\" VALUE=\"Submit\"></TD>\n            <TD><INPUT TYPE=\"reset\" VALUE=\"Clear\"></TD>\n        </TR>\n    </TABLE>\n</form>\n</html>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":325,"y":525,"wires":[["34b9365899b8d35c","b326049bc36baf27"]]},{"id":"34b9365899b8d35c","type":"change","z":"f892482e98c74480","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"'Mr. '&payload.fname&' has a '&payload.select&' and his Phone Number is '&payload.number","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Hi","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":485,"y":525,"wires":[["9bf6820ec2ef4839","ab89fb3781edefb1"]]},{"id":"9bf6820ec2ef4839","type":"ui_toast","z":"f892482e98c74480","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"","x":670,"y":525,"wires":[[]]},{"id":"b326049bc36baf27","type":"debug","z":"f892482e98c74480","name":"debug 2614","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":495,"y":425,"wires":[]},{"id":"ab89fb3781edefb1","type":"ui_text","z":"f892482e98c74480","group":"feabd600.f71b28","order":4,"width":0,"height":0,"name":"","label":"Output:","format":"{{msg.payload}}","layout":"row-left","className":"","style":true,"font":"Copperplate,Copperplate Gothic Light,fantasy","fontSize":"20","color":"#000000","x":585,"y":625,"wires":[]},{"id":"feabd600.f71b28","type":"ui_group","name":"Default","tab":"fb98fdb9.b193a","order":1,"disp":false,"width":"24","collapse":false},{"id":"fb98fdb9.b193a","type":"ui_tab","name":"Home","icon":"dashboard","order":14}]
1 Like

Mustache Template: The Core Nodes : Node-RED

Thank you! I will try it out, but I think the problem is that I am on a CloudFoundry Environment, and I cant access the Filesystem. The normal template node uses the REDIS Storage Module (The Core Nodes : Node-RED), so I am save to use it.

EDIT: I just tried your example, and it works perfectly. Thank you :slight_smile: I will test tomorrow if it is save to restart the environment!

1 Like

Not used them but their web site does not fill me with confidence. I get a LOAD of errors when trying to load it.

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