# Payload value in Uibuilder = null

**URL:** <https://discourse.nodered.org/t/payload-value-in-uibuilder-null/53298>\
**Category:** Dashboard\
**Tags:** uibuilder\
**Created:** [6 November 2021 16:04 UTC](https://discourse.nodered.org/t/payload-value-in-uibuilder-null/53298 "2021-11-06T16:04:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_R\_A\_L\_F](https://avatars.discourse-cdn.com/v4/letter/_/9fc348/32.png) [@\_R\_A\_L\_F](https://discourse.nodered.org/u/_R_A_L_F)\
**Post date:** [6 November 2021 16:04 UTC](https://discourse.nodered.org/t/payload-value-in-uibuilder-null/53298/1 "2021-11-06T16:04:00Z")

</div>

Hello,  
I have an input field for an e-mail address (string) on a website. This value also appears in alert, but in the payload it says null (see screenshot).

What should be the payload value in the script?

Thanks

Here is the script:

> ```
> submitHandler: function () {
> let emailvalue = document.getElementById("exampleInputEmail1").value;
> alert( "Form successful submitted! E-mail: " +emailvalue );
> 
> uibuilder.send( { 'topic': 'E-mail Adresse', 'payload': +emailvalue } )	  
> 
> }
> 
> ```

This is the result:  
 ![wert](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/f/ef5ad6188197687f37640465098c08493f2ed177.png)

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [6 November 2021 16:19 UTC](https://discourse.nodered.org/t/payload-value-in-uibuilder-null/53298/2 "2021-11-06T16:19:05Z")

</div>

log in your browser's dev tools console the value to see whether you are indeed getting the correct element value  
if your selector doesnt find any element it returns null

```auto
let emailvalue = document.getElementById("exampleInputEmail1").value;
console.log(emailvalue)

```

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [6 November 2021 16:27 UTC](https://discourse.nodered.org/t/payload-value-in-uibuilder-null/53298/3 "2021-11-06T16:27:13Z")

</div>

```auto
uibuilder.send( { 'topic': 'E-mail Adresse', 'payload': +emailvalue } )	 

```

Tried it without the `+` ?

---

<div class="post-metadata">

**Author:** ![\_R\_A\_L\_F](https://avatars.discourse-cdn.com/v4/letter/_/9fc348/32.png) [@\_R\_A\_L\_F](https://discourse.nodered.org/u/_R_A_L_F)\
**Post date:** [6 November 2021 19:13 UTC](https://discourse.nodered.org/t/payload-value-in-uibuilder-null/53298/4 "2021-11-06T19:13:24Z")

</div>

Thanks, without "+" it works and show me the value 🙂

---

<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:** [20 November 2021 19:14 UTC](https://discourse.nodered.org/t/payload-value-in-uibuilder-null/53298/5 "2021-11-20T19:14:05Z")

</div>

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