# How to add items in dropdown bar via text-input?

**URL:** <https://discourse.nodered.org/t/how-to-add-items-in-dropdown-bar-via-text-input/39335>\
**Category:** General\
**Created:** [18 January 2021 14:52 UTC](https://discourse.nodered.org/t/how-to-add-items-in-dropdown-bar-via-text-input/39335 "2021-01-18T14:52:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aglio](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Aglio](https://discourse.nodered.org/u/Aglio)\
**Post date:** [18 January 2021 14:52 UTC](https://discourse.nodered.org/t/how-to-add-items-in-dropdown-bar-via-text-input/39335/1 "2021-01-18T14:52:56Z")

</div>

![first](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/d/ade81bc00944449a4e008ff427089de45879edd8.png) ![second](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/008688d53acb1b74620c3951b8250b299c0b5ad9.png)  
Based on the screenshots above the IP address from 192.168.1.1 to 192.168.1.3 is pre-defined in the nodes inside. But now I want it in a way where I enter a new IP address via text input and once I hit enter it will update the dropdown bar with the new IP address added like the image shows 192.168.1.4

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 January 2021 16:29 UTC](https://discourse.nodered.org/t/how-to-add-items-in-dropdown-bar-via-text-input/39335/2 "2021-01-18T16:29:31Z")

</div>

If you look at the `Help` tab when clicking on the `ui-dropdown` node, you wil see how you can send multiple values. You need to dynamically build the original choices, then when the text input is sent, rebuild the choices with the additional option (IP in your case)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 March 2021 16:29 UTC](https://discourse.nodered.org/t/how-to-add-items-in-dropdown-bar-via-text-input/39335/3 "2021-03-19T16:29:49Z")

</div>

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