# How to pass JSON values from form to process variable

**URL:** https://community.ofelia.com/t/how-to-pass-json-values-from-form-to-process-variable/7530
**Category:** Q&A
**Created:** [28 June 2016 13:16 UTC](https://community.ofelia.com/t/how-to-pass-json-values-from-form-to-process-variable/7530 "2016-06-28T13:16:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![michele.pantano](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@michele.pantano](https://community.ofelia.com/u/michele.pantano)
#### Post date: [28 June 2016 13:16 UTC](https://community.ofelia.com/t/how-to-pass-json-values-from-form-to-process-variable/7530/1 "2016-06-28T13:16:34Z")

</div>

Hi,

I’m using bonita 7.2.3. I created a custom widget, to obtain a table with a column that contains checkboxes to get row selected. I created also in the form page a JSON variable to collect values checked in the table. The variable is correctly populated and on page submit I need to transfer those values to a process variable (the type is java.util.List) I defined in the process.  
Contract variables can’t be defined as List, so how can I pass values from page to variable? Using a text contract variable, I obtain an error message as JSON cannot be assigned to TEXT.

Any suggest would be appreciated.  
Thank you

---

<div class="post-metadata">

### Author: ![michele.pantano](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@michele.pantano](https://community.ofelia.com/u/michele.pantano)
#### Post date: [29 June 2016 08:17 UTC](https://community.ofelia.com/t/how-to-pass-json-values-from-form-to-process-variable/7530/2 "2016-06-29T08:17:14Z")

</div>

I solved my problem.  
The way is to pass JSON as string.  
In formOutput it can be done by using **JSON.stringify($data.myJsonData)**

---

<div class="post-metadata">

### Author: ![lucashort7](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@lucashort7](https://community.ofelia.com/u/lucashort7)
#### Post date: [5 April 2017 18:37 UTC](https://community.ofelia.com/t/how-to-pass-json-values-from-form-to-process-variable/7530/3 "2017-04-05T18:37:04Z")

</div>

Hello @michele.pantano,

sorry about asking, but im doing a process who uses a table that will need a checkbox in the first row,  
can u help me coding that custom widget?

Thanks.

---

<div class="post-metadata">

### Author: ![michele.pantano](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@michele.pantano](https://community.ofelia.com/u/michele.pantano)
#### Post date: [6 April 2017 09:33 UTC](https://community.ofelia.com/t/how-to-pass-json-values-from-form-to-process-variable/7530/4 "2017-04-06T09:33:56Z")

</div>

sure. Please explain your question, thanks

---

<div class="post-metadata">

### Author: ![lucashort7](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@lucashort7](https://community.ofelia.com/u/lucashort7)
#### Post date: [13 April 2017 19:01 UTC](https://community.ofelia.com/t/how-to-pass-json-values-from-form-to-process-variable/7530/5 "2017-04-13T19:01:20Z")

</div>

Sorry for answering later… i was busy at work

Im with this code so far:

```
<div class="table-responsive">
<table class="table table-striped">
    <thead>
        <tr>
            <!--<th></th>-->
            <th class="ng-binding ng-scope" ng-repeat="header in properties.headers"> {{header}}</th>
        </tr>
    </thead>
    <tbody class="ng-scope">
        <tr class="ng-scope" ng-repeat="row in properties.content">
            <!--<td><input type="checkbox" class="checkbox"/></td>-->
            <td class="ng-binding ng-scope" ng-repeat="column in properties.columnsKey track by $index">{{column}}</td>
        </tr>
    </tbody>
</table>
</div>

```

Problem: i really cant get the data into the rows, im doing something wrong with the column keys and content input, what am i doing wrong?  
here a pic of the entire widget:  
[http://imgur.com/a/Vhbpt](http://imgur.com/a/Vhbpt)
