# Running oneditprepare again after reconfiguring

**URL:** <https://discourse.nodered.org/t/running-oneditprepare-again-after-reconfiguring/76819>\
**Category:** Developing Nodes\
**Created:** [22 March 2023 11:45 UTC](https://discourse.nodered.org/t/running-oneditprepare-again-after-reconfiguring/76819 "2023-03-22T11:45:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KilianHertel](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@KilianHertel](https://discourse.nodered.org/u/KilianHertel)\
**Post date:** [22 March 2023 11:45 UTC](https://discourse.nodered.org/t/running-oneditprepare-again-after-reconfiguring/76819/1 "2023-03-22T11:45:37Z")

</div>

Hi,

have a config node div in my custom node, as a config type:

```auto
RED.nodes.registerType('json-config', {
        category: 'config',
        defaults: {
            title: {
                value: "",
                required: true
            },
            jsonInput: {
                value: "",
                required: true
            },
            jsonOutput: {
                value: "",
                required: true
            }
        },
        label: function () {
            return this.title
        },
    })

```

and it is in my main custom node included as:

```auto
<div class="form-row">
        <label for="node-input-config"><i class="fa fa-globe"></i> Config</label>
        <input type="text" id="node-input-config" placeholder="Config">
    </div>

```

if i click update on my config type how can i trigger anything in the parent node to reconfigure for example. Is there an event like onconfigchange or something?

---

<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:** [22 March 2023 12:02 UTC](https://discourse.nodered.org/t/running-oneditprepare-again-after-reconfiguring/76819/2 "2023-03-22T12:02:22Z")

</div>

You dont re-run `oneditprepare` you watch for change.

The MQTT node does this...

![chrome_Nfw6VPXqYK](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9e3a42c6b11c01a825f82eaf939e0912574f5ac5.gif)

See source here: [node-red/10-mqtt.html at 4667e76c6bb0f3bc334edf6d7c6d32d733ce6176 · node-red/node-red · GitHub](https://github.com/node-red/node-red/blob/4667e76c6bb0f3bc334edf6d7c6d32d733ce6176/packages/node_modules/%40node-red/nodes/core/network/10-mqtt.html#L878-L880)

---

<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:** [5 April 2023 12:02 UTC](https://discourse.nodered.org/t/running-oneditprepare-again-after-reconfiguring/76819/3 "2023-04-05T12:02:59Z")

</div>

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