# Trying to add a configuration node within a configuration node

**URL:** <https://discourse.nodered.org/t/trying-to-add-a-configuration-node-within-a-configuration-node/85375>\
**Category:** Developing Nodes\
**Created:** [9 February 2024 15:40 UTC](https://discourse.nodered.org/t/trying-to-add-a-configuration-node-within-a-configuration-node/85375 "2024-02-09T15:40:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![njoye](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/njoye/32/88171_2.png) [@njoye](https://discourse.nodered.org/u/njoye)\
**Post date:** [9 February 2024 15:40 UTC](https://discourse.nodered.org/t/trying-to-add-a-configuration-node-within-a-configuration-node/85375/1 "2024-02-09T15:40:41Z")

</div>

Hey, thanks for all the possible help I might be getting here. I am currently expanding a existing node-red-contrib package and for that I would need the following setup:

1. Some "normal" nodes (no problem here)
2. A configuration node that contains a few parameters and another configuration node (a server configuration that I'd like to reuse)

However, when I build the node (I watched out for all the typical pitfalls like the naming of the configuration nodes and referencing them properly, I find that in the "main" (first) configuration node, the second configuration node `<select>` is just shown as a text input with no way to select the relevant nodes. I also took a look at the node-red-dashboard source code which uses this kind of setup, but there it seems to "just" work. Is there anything I need to watch out for when referencing one configuration node within another configuration node ? Does somebody have a simple working example of this ?

Addition: I also tried using existing code that works when I add it to a "normal node". There the select-element is properly populated with all of the existing configuration nodes, but when I use the same code (more or less, just adpted it so that it works in a config node), it shows the string input again.

---

<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:** [9 February 2024 15:54 UTC](https://discourse.nodered.org/t/trying-to-add-a-configuration-node-within-a-configuration-node/85375/2 "2024-02-09T15:54:36Z")

</div>

Hi @njoye

without seeing your code, it's a little hard to be specific. A common fault is forgetting that the select box id needs to be `node-config-input-<propertyName>` if its inside a config node.

Also, make use the config node's `defaults` property that stores the second config node property has a `type` value set.

Another example from the core is the `mqtt-broker` config node that has an optional `tls` node beneath it - [node-red/packages/node\_modules/@node-red/nodes/core/network/10-mqtt.html at b10ef4c98ce8bf1b61584a046fdb4bc90d485295 · node-red/node-red · GitHub](https://github.com/node-red/node-red/blob/b10ef4c98ce8bf1b61584a046fdb4bc90d485295/packages/node_modules/%40node-red/nodes/core/network/10-mqtt.html#L489)

---

<div class="post-metadata">

**Author:** ![njoye](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/njoye/32/88171_2.png) [@njoye](https://discourse.nodered.org/u/njoye)\
**Post date:** [10 February 2024 09:31 UTC](https://discourse.nodered.org/t/trying-to-add-a-configuration-node-within-a-configuration-node/85375/3 "2024-02-10T09:31:39Z")

</div>

Thank you so much! The `node-config-input-<property>` was it! This doesn't seem to be needed for "normal" nodes right? That's why I didn't think I needed to change it and I didn't see that that was the case - with that added it works. Thank you!!

---

<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:** [24 February 2024 09:32 UTC](https://discourse.nodered.org/t/trying-to-add-a-configuration-node-within-a-configuration-node/85375/4 "2024-02-24T09:32:23Z")

</div>

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