# Populate text area or something similar

**URL:** <https://discourse.nodered.org/t/populate-text-area-or-something-similar/43844>\
**Category:** General\
**Created:** [8 April 2021 07:30 UTC](https://discourse.nodered.org/t/populate-text-area-or-something-similar/43844 "2021-04-08T07:30:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jake123](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@jake123](https://discourse.nodered.org/u/jake123)\
**Post date:** [8 April 2021 07:30 UTC](https://discourse.nodered.org/t/populate-text-area-or-something-similar/43844/1 "2021-04-08T07:30:20Z")

</div>

I made a custom node that gets some data and populates the select tag with it. For now i have 8 options. Later on i will have like 50 of them and i want to keep track of which 1 i have selected. Any idea how would i do that? Like store the values of the options in text area or something like that.The select tag allows to select multiple options. I know how to populate it with 1 option. The problem is if i select multiple options.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 April 2021 21:31 UTC](https://discourse.nodered.org/t/populate-text-area-or-something-similar/43844/2 "2021-04-08T21:31:18Z")

</div>

Not clear where the UI is - do you mean in the Node-RED Editor, Dashboard or somewhere else?

If you mean the Editor, if you have followed the instructions in the docs, the value will be persisted for you when you do a (re)deploy.

However, you are responsible for configuring the select tag so that it shows the right thing. You do that in the `oneditprepare` function in your node's html file.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [8 April 2021 21:41 UTC](https://discourse.nodered.org/t/populate-text-area-or-something-similar/43844/3 "2021-04-08T21:41:31Z")

</div>

@jake123 we've tried to point you in the right direction on this across multiple threads.

In your `oneditsave` function you'll have to take the list of selected options and choose someway to encode them into a node property.

In your `oneditprepare` function you use the same property to restore what was selected previously.

[https://nodered.org/docs/creating-nodes/properties](https://nodered.org/docs/creating-nodes/properties)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 April 2021 22:04 UTC](https://discourse.nodered.org/t/populate-text-area-or-something-similar/43844/4 "2021-04-08T22:04:27Z")

</div>

@TotallyInformation@knolleary  
I think this is pretty much a duplicate thread to [How to keep data after deploying](https://discourse.nodered.org/t/how-to-keep-data-after-deploying/43865)

@jake123 please dont create multiple threads for the same question. It just causes confusion.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [8 April 2021 22:06 UTC](https://discourse.nodered.org/t/populate-text-area-or-something-similar/43844/5 "2021-04-08T22:06:14Z")

</div>

Good point - it is pretty much identical. I'll close this thread so efforts can be focussed in the thread you've already replied in.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [8 April 2021 22:06 UTC](https://discourse.nodered.org/t/populate-text-area-or-something-similar/43844/6 "2021-04-08T22:06:19Z")

</div>


