HTTP radio buttons, drop down and check boxes

Hi,

I would greatly appreciate some help with some HTTP functions, like radio buttons, dropdown boxes, and checkboxes.

I have a flow, its displays a screen and gets input from the user, that input needs to be represented to the second screen in the flow for the user to confirm it is correct. Currently, the second screen only contains most of the code from the first screen, to make it easier to update the code to the correct code.

I have been playing with this all week and have not been able to get the data back to the second screen.

I have included a simplified version of my code.

[{"id":"e8ec9e7e.74b12","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"7ad0187d.0e87f8","type":"http in","z":"e8ec9e7e.74b12","name":"Get v1","url":"/v1","method":"get","upload":false,"swaggerDoc":"","x":293.0173645019531,"y":119.01041412353516,"wires":[["c8e01cb.dc164e","81e7a704.c13c68"]]},{"id":"932a3f41.c4574","type":"http response","z":"e8ec9e7e.74b12","name":"","statusCode":"","headers":{},"x":313.0173645019531,"y":199.01041412353516,"wires":[]},{"id":"c8e01cb.dc164e","type":"debug","z":"e8ec9e7e.74b12","name":"Flow test1 a","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":533.0173645019531,"y":119.01041412353516,"wires":[]},{"id":"f483522.c940bb","type":"debug","z":"e8ec9e7e.74b12","name":"Flow test1 b","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":533.0173645019531,"y":159.01041412353516,"wires":[]},{"id":"81e7a704.c13c68","type":"template","z":"e8ec9e7e.74b12","name":"Input form HTML","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<HTML>\n  \n    <head>\n    <meta charset=\"UTF-8\">\n        <center>Vehicle details</center>\n            <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n            <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n         <title>Document</title>\n    <fieldset>\n\n    <form action=\"/v1\" method=\"post\"></form>\n\n    <form id=\"v1\"><formid></formid>\n    \n    </form>\n\n    <p>Belonging to Departments:</p>\n            \n            <div>\n                  <input type=\"radio\" id=\"Tennant\" name=\"Dept A Name\" value=\"Dept A Value\" checked>\n                  <label for=\"Dept A Label\">Dept A</label>\n        \n                  <input type=\"radio\" id=\"Dept A\" name=\"Dept B Name\" value=\"Dept B Value\">\n                  <label for=\"Dept B Label\">Dept B</label>\n        \n                  <input type=\"radio\" id=\"Dept A\" name=\"Dept C Name\" value=\"Dept C Value\">\n                  <label for=\"Dept C label\">Dept C</label>\n        \n            </div>\n \n<p>Choose day of working week: </p>\n\n    <select id=\"DayOfWeek\">\n   \n      <option>Monday</option>\n      <option>Tuseday</option>\n      <option>Wednesday</option>\n      <option>Thursday</option>\n      <option>Friday</option>\n    \n    </select>\n    \n    <br>\n\n    <p>Send following type of message when seen</p>\n        <input type=\"checkbox\" name=\"CheckChoice\" id=\"\" value=\"Email\">Email\n        <input type=\"checkbox\" name=\"CheckChoice\" id=\"\" value=\"SMS\">SMS\n\n\t<br>  <br>\n\t  \n    <p>Update record</p>\n    <form action=\"/v2\" method=\"post\">\n   <button onclick=\"updatedata()\">Update Record:</button>     \n       </form>   \n \n  </fieldset>\n","x":283.0173645019531,"y":159.01041412353516,"wires":[["932a3f41.c4574","f483522.c940bb"]]},{"id":"4be22287.c3ff4c","type":"http in","z":"e8ec9e7e.74b12","name":"Post v2","url":"/v2","method":"post","upload":false,"swaggerDoc":"","x":293.0173645019531,"y":259.01041412353516,"wires":[["fc86b7c5.c21228","aa75e2b2.fcf17"]]},{"id":"55bbd60e.de9868","type":"http response","z":"e8ec9e7e.74b12","name":"","statusCode":"","headers":{},"x":313.0173645019531,"y":339.01041412353516,"wires":[]},{"id":"fc86b7c5.c21228","type":"debug","z":"e8ec9e7e.74b12","name":"Flow test2 a","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":533.0173645019531,"y":259.01041412353516,"wires":[]},{"id":"fa09f4e.2bb3a08","type":"debug","z":"e8ec9e7e.74b12","name":"Flow test2 b","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":533.0173645019531,"y":299.01041412353516,"wires":[]},{"id":"aa75e2b2.fcf17","type":"template","z":"e8ec9e7e.74b12","name":"Input form HTML","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<HTML>\n  \n    <head>\n    <meta charset=\"UTF-8\">\n        <center>You updated vehicle details to the following</center>\n            <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n            <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n         <title>Document</title>\n    <fieldset>\n\n    <form action=\"/v2\" method=\"post\"></form>\n\n    <form id=\"v2\"><formid></formid>\n    \n    </form>\n\n    <p>Belonging to Departments:</p>\n            \n            <div>\n                \n              <input type=\"radio\" id=\"Tennant\" name=\"Dept A Name\" value=\"Dept A Value\" checked>\n              <label for=\"Dept A Label\">Dept A</label>\n    \n              <input type=\"radio\" id=\"Dept A\" name=\"Dept B Name\" value=\"Dept B Value\">\n              <label for=\"Dept B Label\">Dept B</label>\n    \n              <input type=\"radio\" id=\"Dept A\" name=\"Dept C Name\" value=\"Dept C Value\">\n              <label for=\"Dept C label\">Dept C</label>\n        \n            </div>\n \n    <p>Choose day of working week: </p>\n\n    <select id=\"DayOfWeek\">\n   \n      <option>Monday</option>\n      <option>Tuseday</option>\n      <option>Wednesday</option>\n      <option>Thursday</option>\n      <option>Friday</option>\n    \n    </select>\n    \n    <br>\n\n    <p>Send following type of message when seen</p>\n        <input type=\"checkbox\" name=\"CheckChoice\" id=\"\" value=\"Email\">Email\n        <input type=\"checkbox\" name=\"CheckChoice\" id=\"\" value=\"SMS\">SMS\n\n\t<br>  <br>\n\n    <p>Confirm details</p>\n\n    <form action=\"/v3\" method=\"post\">\n   <button onclick=\"updatedata()\">Confirm details:</button>     \n       </form>   \n       \n    <p>Fix errors</p>\n       <form action=\"/v1\" method=\"post\">\n   <button onclick=\"updatedata()\">Dont save:</button>  \n    </form>     \n     \n\n </fieldset>","x":283.0173645019531,"y":299.01041412353516,"wires":[["55bbd60e.de9868","fa09f4e.2bb3a08"]]},{"id":"4c949785.ca0998","type":"http in","z":"e8ec9e7e.74b12","name":"Post v3","url":"/v3","method":"post","upload":false,"swaggerDoc":"","x":288.0173645019531,"y":429.0104064941406,"wires":[["52214be7.d66de4","70527a96.ba8044"]]},{"id":"ed21cb1b.3bba68","type":"http response","z":"e8ec9e7e.74b12","name":"","statusCode":"","headers":{},"x":308.0173645019531,"y":509.0104064941406,"wires":[]},{"id":"52214be7.d66de4","type":"debug","z":"e8ec9e7e.74b12","name":"Flow test3 a","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":528.0173645019531,"y":429.0104064941406,"wires":[]},{"id":"696645ad.63cf3c","type":"debug","z":"e8ec9e7e.74b12","name":"Flow test3 b","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":528.0173645019531,"y":469.0104064941406,"wires":[]},{"id":"70527a96.ba8044","type":"template","z":"e8ec9e7e.74b12","name":"Input form HTML","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"\n\n<p>More processing here</p>\n\n\n","x":278.0173645019531,"y":469.0104064941406,"wires":[["ed21cb1b.3bba68","696645ad.63cf3c"]]},{"id":"abda4e87.8626d","type":"http in","z":"e8ec9e7e.74b12","name":"Post v1","url":"/v1","method":"post","upload":false,"swaggerDoc":"","x":297.0173645019531,"y":62.010414123535156,"wires":[["81e7a704.c13c68"]]}]

Thanks.

Raj

Please export all your flows again, read this post and edit your first post.

Thanks, updated.

The code editor for the first template node tells you that you have an error so that isn't a good start.

Also there are several errors in the html so you really need to fix those before continuing.

In fact, each of the templates has errors.

1 Like

Ok, fixed

To start to flow, in a web browser go to http://127.0.0.1:1880/v1

Bump, anyone have an idea on how to do this?

Well, you seemed to indicate that the problem was fixed once you sorted all of the errors in your HTML.

I expect you will need to repost a flow that errors.