# Get the value from html input using ng-repeat

**URL:** <https://discourse.nodered.org/t/get-the-value-from-html-input-using-ng-repeat/43445>\
**Category:** Dashboard\
**Created:** [31 March 2021 08:22 UTC](https://discourse.nodered.org/t/get-the-value-from-html-input-using-ng-repeat/43445 "2021-03-31T08:22:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [31 March 2021 08:22 UTC](https://discourse.nodered.org/t/get-the-value-from-html-input-using-ng-repeat/43445/1 "2021-03-31T08:22:35Z")

</div>

hi there,

I m showing a table on the dashboard using ng-repeat in a template node. One column is a text input.  
How ever I am not able to get the value of the text input back into js.  
I think because of the ng-repeat..  
Where is my mistake?

Can anyone help me out?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/7/b7d067bbb751ba275377ec8f38e45dcf3ae2a990.png)

---

<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:** [31 March 2021 11:04 UTC](https://discourse.nodered.org/t/get-the-value-from-html-input-using-ng-repeat/43445/2 "2021-03-31T11:04:51Z")

</div>

try...

```auto
<table>
    <tbody ng-repeat="x in msg.payload">
    <tr>
        <td><input type="text" ng-model="x.input" ng-dblclick="send({payload: x})" /> </td>
        <td>{{ x.name }}</td>
        <td>{{ x.age }}</td>
    </tr>
    </tbody>
</table>

```

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [31 March 2021 12:30 UTC](https://discourse.nodered.org/t/get-the-value-from-html-input-using-ng-repeat/43445/3 "2021-03-31T12:30:51Z")

</div>

> [@Steve-Mcl](#):
>
> `</tbody>`

works for me, thank you 🙂

If I want to go one step further and only want the input in the lines in which no value comes from my function node, would that be possible?

---

<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:** [31 March 2021 13:14 UTC](https://discourse.nodered.org/t/get-the-value-from-html-input-using-ng-repeat/43445/4 "2021-03-31T13:14:16Z")

</div>

You can do

```auto
ng-dblclick="send({payload: x.input})" 

```

... But why would you. You won't know which row it came from.

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [31 March 2021 13:23 UTC](https://discourse.nodered.org/t/get-the-value-from-html-input-using-ng-repeat/43445/5 "2021-03-31T13:23:32Z")

</div>

I wanted to complete the table which is generated from an incomplete database via the input and display the completed input ..

but if this is not possible i will do it in a different way..

---

<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:** [14 April 2021 13:24 UTC](https://discourse.nodered.org/t/get-the-value-from-html-input-using-ng-repeat/43445/6 "2021-04-14T13:24:10Z")

</div>

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