# Input Numeric sent on Button click

**URL:** https://discourse.nodered.org/t/input-numeric-sent-on-button-click/42829
**Category:** General
**Created:** [18 March 2021 15:55 UTC](https://discourse.nodered.org/t/input-numeric-sent-on-button-click/42829 "2021-03-18T15:55:17Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![edwardr](https://avatars.discourse-cdn.com/v4/letter/e/e0b2c6/32.png) [@edwardr](https://discourse.nodered.org/u/edwardr)
#### Post date: [18 March 2021 15:55 UTC](https://discourse.nodered.org/t/input-numeric-sent-on-button-click/42829/1 "2021-03-18T15:55:17Z")

</div>

Hello Folks,

I am trying to find a way to make a UI interface on node red where I input a numeric value into the text input node then only send such when you click a submit button or slider being on.

I couldn`t find an example on the forum nor elsewhere...

Anyone have any good ideas how to go around this?

Thank you,

Ed

---

<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: [18 March 2021 16:01 UTC](https://discourse.nodered.org/t/input-numeric-sent-on-button-click/42829/2 "2021-03-18T16:01:31Z")

</div>

> [@edwardr](#):
>
> I couldn`t find an example on the forum nor elsewhere...

It has been covered many times in the forum. Have a browser through the dashboard category and node-red flows pages

arrange 2 flows like this...

1. UI\_TEXT --\> CHANGE node (set flow.UserInput to msg.payload)
2. UI\_BUTTON --\> CHANGE node (set msg.payload to flow.UserInput)

OR

1. Use ui\_form

---

<div class="post-metadata">

### Author: ![edwardr](https://avatars.discourse-cdn.com/v4/letter/e/e0b2c6/32.png) [@edwardr](https://discourse.nodered.org/u/edwardr)
#### Post date: [18 March 2021 16:03 UTC](https://discourse.nodered.org/t/input-numeric-sent-on-button-click/42829/3 "2021-03-18T16:03:06Z")

</div>

The versions I have found on the forum look at how to set a value in stored using non UI nodes or their own buttons etc. My question was how to only use the UI nodes available.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [18 March 2021 16:10 UTC](https://discourse.nodered.org/t/input-numeric-sent-on-button-click/42829/4 "2021-03-18T16:10:16Z")

</div>

Have a look at the ui\_form node, which may do what you want.

---

<div class="post-metadata">

### Author: ![edwardr](https://avatars.discourse-cdn.com/v4/letter/e/e0b2c6/32.png) [@edwardr](https://discourse.nodered.org/u/edwardr)
#### Post date: [18 March 2021 16:34 UTC](https://discourse.nodered.org/t/input-numeric-sent-on-button-click/42829/5 "2021-03-18T16:34:29Z")

</div>

Hi Colin, yes so I`ve been using the UI form- its very good, although annoyingly if I am inputting a number , say 345 with a name % it changes this into a {"%" :345}.

How would I be able to make a function that turns the msg.payload from {"%" :345} to purely 345?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [18 March 2021 17:15 UTC](https://discourse.nodered.org/t/input-numeric-sent-on-button-click/42829/6 "2021-03-18T17:15:26Z")

</div>

Read the node-red docs page working with messages and it shows you how to get the path to a property in the debug pane so you can use that in a Change node. Also change the Name field in the form config to use something other than "%" so that the property name is not a special character so that it is easier to access. You can leave the Label at % as that is what appears on the form.

---

<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: [17 May 2021 17:15 UTC](https://discourse.nodered.org/t/input-numeric-sent-on-button-click/42829/7 "2021-05-17T17:15:36Z")

</div>

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