# \[Uibuilder\] Send data the msg.payload

**URL:** <https://discourse.nodered.org/t/uibuilder-send-data-the-msg-payload/26958>\
**Category:** Dashboard\
**Created:** [19 May 2020 23:19 UTC](https://discourse.nodered.org/t/uibuilder-send-data-the-msg-payload/26958 "2020-05-19T23:19:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OmarDev](https://avatars.discourse-cdn.com/v4/letter/o/a88e57/32.png) [@OmarDev](https://discourse.nodered.org/u/OmarDev)\
**Post date:** [19 May 2020 23:19 UTC](https://discourse.nodered.org/t/uibuilder-send-data-the-msg-payload/26958/1 "2020-05-19T23:19:25Z")

</div>

Hey everyone i want to send data(counterBtn) to msg.payload

this.counterBtn = this.counterBtn + 1

```
        uibuilder.onChange( {

            'payload': {

                'type': 'counterBtn',

                'btnCount': this.counterBtn,

                'message': this.inputText,

                'inputChkBox': this.inputChkBox

            }

        } )
```

---

<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:** [20 May 2020 00:43 UTC](https://discourse.nodered.org/t/uibuilder-send-data-the-msg-payload/26958/2 "2020-05-20T00:43:27Z")

</div>

`uibuilder.onChange()` is for receipt of data from Node-RED to the browser. Further, that function has 2 parameters, the first being the event name, the event `msg` is triggered when a new standard msg is received from node-RED, the 2nd parameter is a function that is called when a msg event is triggered.

As per the documentation, the function you want is `uibuilder.send(msgtosend)`.

---

<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 June 2020 00:43 UTC](https://discourse.nodered.org/t/uibuilder-send-data-the-msg-payload/26958/3 "2020-06-19T00:43:30Z")

</div>

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