Form Node with drop down

Hello , I am using a form node to create a form. I want the drop down in my form. But it is not available in form node.Is there any other form node which contains drop down ? If yes, then please let me know.
Thanks

Not that I am aware of. But you can create similar functionality by using regular widgets, including a button called submit, and a join node to join all the inputs together into a single message when submit is pressed.

1 Like

Thanks for your reply sir. I have tried it but actually i want the output in json format.
This is my flow:

[{"id":"12361b5a.9fec85","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"e615f09a.83e45","type":"function","z":"12361b5a.9fec85","name":"Store Data","func":"var data1 = context.get(\"data1\") || 0; //get from context or default to 0\nvar data2 = context.get(\"data2\") || 0; //get from context or default to 0\n\nswitch (msg.topic){\n\n    case \"task1\":\n        data1 = msg.payload; \n        context.set(\"data1\", data1);//store in context for next time \n        return;\n        \n    case \"task2\":\n        data2 = msg.payload;\n        context.set(\"data2\", data2); //store in context for next time \n        return;\n        \n    case \"go\":\n     msg.payload = \" text 1 \"+ data1 +\" , text2 \" + data2;\n      //msg1.payload=data1;\n      //msg2.payload=data2;\n      \n    \n}\n\n//msg.topic = \"go\";\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"x":350,"y":240,"wires":[["a3a41586.d75088"]]},{"id":"38b2b2cc.ad272e","type":"ui_text_input","z":"12361b5a.9fec85","name":"","label":"Product Key","tooltip":"","group":"a63b29d.f4c81d8","order":2,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"task1","x":110,"y":200,"wires":[["e615f09a.83e45"]]},{"id":"8666c997.9feb68","type":"ui_text_input","z":"12361b5a.9fec85","name":"","label":"PDU Type","tooltip":"","group":"a63b29d.f4c81d8","order":3,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"task2","x":110,"y":240,"wires":[["e615f09a.83e45"]]},{"id":"5fc885d7.6638bc","type":"ui_button","z":"12361b5a.9fec85","name":"","group":"a63b29d.f4c81d8","order":4,"width":0,"height":0,"passthru":false,"label":"Submit","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"go","x":100,"y":280,"wires":[["e615f09a.83e45"]]},{"id":"87a2c2ec.1d19","type":"debug","z":"12361b5a.9fec85","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":320,"wires":[]},{"id":"a3a41586.d75088","type":"json","z":"12361b5a.9fec85","name":"","property":"payload","action":"str","pretty":true,"x":430,"y":360,"wires":[["23223e08.7cbed2"]]},{"id":"23223e08.7cbed2","type":"file","z":"12361b5a.9fec85","name":"","filename":"C:\\Users\\vishakha\\Desktop\\Node Red\\try","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":520,"y":440,"wires":[["87a2c2ec.1d19"]]},{"id":"a63b29d.f4c81d8","type":"ui_group","z":"","name":"Form","tab":"4bed3390.45d6dc","disp":true,"width":"15","collapse":false},{"id":"4bed3390.45d6dc","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

Right now , after deploying this , i get:
image

Like when I use form node i directly get the output in json format .
image

What changes need to be done in my code so that i can get the output in json format?
please let me know.
Thanks!:slightly_smiling_face:

It is the object you are seeing, not JSON

 case "go":
       // create new object with property-name:value pairs in it separated with comma
     msg.payload = {"text_1": data1 ,"text_2":data2};
2 Likes

Ohhhh,got it . Thanks a lot !! it worked!:smile: