Uibuilder - Manage form data

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

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

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

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

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).


Just gather the data into the payload and send it.

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