# Saving form data

**URL:** <https://forum.flowable.org/t/saving-form-data/9555>\
**Category:** Uncategorized\
**Created:** [July 21, 2022, 9:23am UTC](https://forum.flowable.org/t/saving-form-data/9555 "2022-07-21T09:23:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vkras](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@vkras](https://forum.flowable.org/u/vkras)\
**Post date:** [July 21, 2022, 9:23am UTC](https://forum.flowable.org/t/saving-form-data/9555/1 "2022-07-21T09:23:25Z")

</div>

Hi,

I have a simple form, attached to multiple task in multiple processes, containing only a text field.

How can I connect a process variable to it and make sure that the value I write in text field gets updated?

V.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [July 22, 2022, 4:33pm UTC](https://forum.flowable.org/t/saving-form-data/9555/2 "2022-07-22T16:33:18Z")

</div>

All form fields map to a process instance instance variable. If a variable has a value and the field has the same name as the variable, the value will be shown.

---

<div class="post-metadata">

**Author:** ![vkras](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@vkras](https://forum.flowable.org/u/vkras)\
**Post date:** [July 23, 2022, 2:01pm UTC](https://forum.flowable.org/t/saving-form-data/9555/3 "2022-07-23T14:01:04Z")

</div>

Thank you on fast reply.

Regards

---

<div class="post-metadata">

**Author:** ![vkras](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@vkras](https://forum.flowable.org/u/vkras)\
**Post date:** [July 25, 2022, 7:25am UTC](https://forum.flowable.org/t/saving-form-data/9555/4 "2022-07-25T07:25:29Z")

</div>

Just one more question about the type of variable.

Im using json structure as a type of variable type and I can access the value for some property from json structure, but how do I map it to other type of “containter” on form, i.e. text fields, number of any other?

Kind regards,  
V

---

<div class="post-metadata">

**Author:** ![gdharley](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/gdharley/32/2695_2.png) [@gdharley](https://forum.flowable.org/u/gdharley)\
**Post date:** [July 28, 2022, 1:56pm UTC](https://forum.flowable.org/t/saving-form-data/9555/5 "2022-07-28T13:56:44Z")

</div>

Assuming you have a JSON variable (player) with the following structure:

{  
“id”: 7,  
“name”: “John Doe”,  
“age”: 22,  
“hobbies”: {  
“indoor”: [  
“Chess”  
],  
“outdoor”: [  
“BasketballStand-up Comedy”  
]  
}  
}

You can access any individual element using standard JSON dot notation.  
So to access the “age” you would use player.age and so forth.

---

<div class="post-metadata">

**Author:** ![vkras](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@vkras](https://forum.flowable.org/u/vkras)\
**Post date:** [July 29, 2022, 5:35am UTC](https://forum.flowable.org/t/saving-form-data/9555/6 "2022-07-29T05:35:23Z")

</div>

Thank you on your answer.

One more question regarding that - in ID field I cant put format like you wrote, e.i. player.dot.

This is a picture of text form field, and its not working. Does that means that I can only user Exoression field on forms to show data?

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/flowable/original/2X/7/7e6d035479cfda2ec590f2b2e8dbf446d0d338df.png)

---

<div class="post-metadata">

**Author:** ![gdharley](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/gdharley/32/2695_2.png) [@gdharley](https://forum.flowable.org/u/gdharley)\
**Post date:** [July 29, 2022, 7:03pm UTC](https://forum.flowable.org/t/saving-form-data/9555/7 "2022-07-29T19:03:42Z")

</div>

Hi,  
First off, I apologize as I didnt realize you were using the open source version of Flowable.  
You wont be able to directly reference the elements of a JSON node using simple dot notation in a form with OSS version.  
You will need to retrieve the JSON variable, parse it and save the fields you want to display as primitives.

E.g. var json = execution.getVariable(‘json’);  
var name = JSON.parse(json.textValue()).name;

execution.setVariable(‘name’, name)

You can now reference name in your form.

---

<div class="post-metadata">

**Author:** ![vkras](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@vkras](https://forum.flowable.org/u/vkras)\
**Post date:** [July 30, 2022, 6:39am UTC](https://forum.flowable.org/t/saving-form-data/9555/8 "2022-07-30T06:39:20Z")

</div>

Thank you very much on explanation.

Regards,  
V.
