# Pre-populating ui\_form

**URL:** https://discourse.nodered.org/t/pre-populating-ui-form/89329
**Category:** General
**Tags:** dashboard-2
**Created:** [7 July 2024 08:25 UTC](https://discourse.nodered.org/t/pre-populating-ui-form/89329 "2024-07-07T08:25:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)
#### Post date: [7 July 2024 08:25 UTC](https://discourse.nodered.org/t/pre-populating-ui-form/89329/1 "2024-07-07T08:25:04Z")

</div>

In the D2 docs here [Form ui-form | Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/nodes/widgets/ui-form.html#populating-form-data), an example is given on how to pre-populate a ui-form. Has this actually been implemented? No matter what I have tried I cannot get a form to populate with the given example.

Cheers  
Bob

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [7 July 2024 09:09 UTC](https://discourse.nodered.org/t/pre-populating-ui-form/89329/2 "2024-07-07T09:09:28Z")

</div>

I can get form to prepopulate using latest 1.12.4, there a few issues though.

- When prepopulated you have to click on all fields before submit button works
- the prepopulation object is passed through the node without a submit, which seems a bad idea.

example flow

```auto
[{"id":"0872583c36c11d85","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"name\":\"aaa\",\"phone\":\"1234\"}","payloadType":"json","x":110,"y":200,"wires":[["4e2122c1d3d77fd9"]]},{"id":"4e2122c1d3d77fd9","type":"ui-form","z":"d1395164b4eec73e","name":"","group":"9d83cd8b3d5ee33c","label":"","order":1,"width":0,"height":0,"options":[{"label":"Name","key":"name","type":"text","required":true,"rows":null},{"label":"Phone","key":"phone","type":"number","required":true,"rows":null}],"formValue":{"name":"","phone":""},"payload":"","submit":"submit","cancel":"clear","resetOnSubmit":true,"topic":"topic","topicType":"msg","splitLayout":"","className":"","x":310,"y":160,"wires":[["c6708522f7441ae1"]]},{"id":"c6708522f7441ae1","type":"debug","z":"d1395164b4eec73e","name":"debug 2561","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":470,"y":160,"wires":[]},{"id":"9d83cd8b3d5ee33c","type":"ui-group","name":"Group1","page":"c694d0ebe0d2b702","width":"6","height":"1","order":1,"showTitle":true,"className":"","visible":"true","disabled":"false"},{"id":"c694d0ebe0d2b702","type":"ui-page","name":"Page1","ui":"1805777f90e92057","path":"/page1","icon":"home","layout":"grid","theme":"a965ccfef139317a","order":2,"className":"","visible":"true","disabled":"false"},{"id":"1805777f90e92057","type":"ui-base","name":"dashboard","path":"/dashboard","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false},{"id":"a965ccfef139317a","type":"ui-theme","name":"HN Theme","colors":{"surface":"#5c5c5c","primary":"#00fdff","bgPage":"#383838","groupBg":"#4f4f4f","groupOutline":"#858585"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]

```

I have raised an issue on above [ui-form passing prepopulated and submit not clickable · Issue #1069 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/1069)

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [7 July 2024 11:19 UTC](https://discourse.nodered.org/t/pre-populating-ui-form/89329/3 "2024-07-07T11:19:15Z")

</div>

Thanks for raising, will address when back at work on Tueday

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [7 July 2024 11:27 UTC](https://discourse.nodered.org/t/pre-populating-ui-form/89329/4 "2024-07-07T11:27:38Z")

</div>

> [@Bobo](#):
>
> Has this actually been implemented?

This was implemented in `1.12.4` which only came out this week

---

<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: [21 July 2024 11:28 UTC](https://discourse.nodered.org/t/pre-populating-ui-form/89329/5 "2024-07-21T11:28:09Z")

</div>

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