# Replace Dashboard button with uibuilder button

**URL:** <https://discourse.nodered.org/t/replace-dashboard-button-with-uibuilder-button/17000>\
**Category:** General\
**Created:** [22 October 2019 08:46 UTC](https://discourse.nodered.org/t/replace-dashboard-button-with-uibuilder-button/17000 "2019-10-22T08:46:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [22 October 2019 11:55 UTC](https://discourse.nodered.org/t/replace-dashboard-button-with-uibuilder-button/17000/4 "2019-10-22T11:55:48Z")

</div>

From the help for the Dashboard button:

> If set to pass through mode a message arriving on the input will act like pressing the button. The output payload will be as defined in the node configuration.

So unless you've added a Dashboard Template node with a script that does processing of the Dashboard button in the front-end (e.g. the users browser), you don't need to do anything other than connect the output of uibuilder to whatever your Dashboard button is connected to.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/ed8b85e77ffd2fcc717c313567371b38f2311ee9.png)

Add this to the methods section of your uibuilder index.js:

```auto
        sendMe: function() {
            uibuilder.send({topic:'sentFromUibuilder',payload:'BUTTONPRESSED'})
        },

```

and this to index.html:

```auto
<b-button pill variant="secondary" v-on:click="sendMe">Send Me</b-button>

```

Here is the example flow:

```auto
[{"id":"903c5b81.6c3188","type":"inject","z":"18cb249f.38bafb","name":"","topic":"TESTING-UIB","payload":"{\"fan_kleine_kamer\":{\"onoff\":\"off\",\"value\":\"Off\"}}","payloadType":"json","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":190,"y":580,"wires":[["963f6e2c.6d318"]]},{"id":"1002cdc9.9a0522","type":"debug","z":"18cb249f.38bafb","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":670,"y":560,"wires":[]},{"id":"963f6e2c.6d318","type":"uibuilder","z":"18cb249f.38bafb","name":"uib1","topic":"","url":"uib","fwdInMessages":false,"allowScripts":false,"allowStyles":true,"copyIndex":true,"showfolder":false,"x":510,"y":580,"wires":[["1002cdc9.9a0522","b2f1eaa2.6a0d18"],["33d6816c.a2ecde"]]},{"id":"33d6816c.a2ecde","type":"debug","z":"18cb249f.38bafb","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":670,"y":600,"wires":[]},{"id":"6e0aeacb.f85b34","type":"link in","z":"18cb249f.38bafb","name":"uib","links":["338fe20e.adb5ce"],"x":335,"y":540,"wires":[["963f6e2c.6d318"]]},{"id":"c5a714c6.580c98","type":"ui_button","z":"18cb249f.38bafb","name":"","group":"291887c4.c02358","order":3,"width":0,"height":0,"passthru":false,"label":"Test","tooltip":"","color":"","bgcolor":"","icon":"","payload":"BUTTONPRESSED","payloadType":"str","topic":"SentFromDashboardButton","x":810,"y":520,"wires":[["b2f1eaa2.6a0d18"]]},{"id":"b2f1eaa2.6a0d18","type":"debug","z":"18cb249f.38bafb","name":"DO SOMETHING CRAZY","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1010,"y":560,"wires":[]},{"id":"291887c4.c02358","type":"ui_group","z":"","name":"Default","tab":"408c6142.3e537","disp":true,"width":"6","collapse":false},{"id":"408c6142.3e537","type":"ui_tab","z":"","name":"TEST","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

And here is the output:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/22ae373f7a2da08ec3c532f7037f0071deb474e1.png)

---

_[View the full topic](https://discourse.nodered.org/t/replace-dashboard-button-with-uibuilder-button/17000)._
