# Uibuilder - Manage form data

**URL:** <https://discourse.nodered.org/t/uibuilder-manage-form-data/65927>\
**Category:** General\
**Tags:** uibuilder\
**Created:** [2 August 2022 11:37 UTC](https://discourse.nodered.org/t/uibuilder-manage-form-data/65927 "2022-08-02T11:37:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![miladmrm](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@miladmrm](https://discourse.nodered.org/u/miladmrm)\
**Post date:** [2 August 2022 11:37 UTC](https://discourse.nodered.org/t/uibuilder-manage-form-data/65927/1 "2022-08-02T11:37:01Z")

</div>

How to manage form data sent from UI Builder in NR?

```auto
<form enctype="multipart/form-data" id="myform">
        <input type="text" name="first">
        <input type="text" name="second">
        <input type="submit" id="submitBtn" onclick="fnSendToNR(?)">
</form>

```

For example, how do I receive the following form data in the `fnSendToNR`  
function? No need for form `action` and form `method` variables?

```auto
window.fnSendToNR = function fnSendToNR(payload) {
    uibuilder.send({
        'topic': 'msg-from-uibuilder-front-end',
        'payload': payload
    })
}

```

---

<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:** [2 August 2022 12:00 UTC](https://discourse.nodered.org/t/uibuilder-manage-form-data/65927/2 "2022-08-02T12:00:51Z")

</div>

The form data is all in the DOM. So you need to get a reference to the form elements of the DOM.

If you are using the new client, you can use `$('#myform')`. For the older client, you use [Document.getElementById() - Web APIs | MDN (mozilla.org)](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById).

[https://www.google.com/search?q=javascript+get+form+data](https://www.google.com/search?q=javascript+get+form+data)

Just gather the data into the payload and send it.

---

<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:** [1 October 2022 12:01 UTC](https://discourse.nodered.org/t/uibuilder-manage-form-data/65927/3 "2022-10-01T12:01:29Z")

</div>

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