# Form component checkbox not returning value

**URL:** <https://forum.inductiveautomation.com/t/form-component-checkbox-not-returning-value/116551>\
**Category:** Ignition\
**Tags:** perspective, ignition83\
**Created:** [July 28, 2026, 1:10pm UTC](https://forum.inductiveautomation.com/t/form-component-checkbox-not-returning-value/116551 "2026-07-28T13:10:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [July 28, 2026, 1:10pm UTC](https://forum.inductiveautomation.com/t/form-component-checkbox-not-returning-value/116551/1 "2026-07-28T13:10:15Z")

</div>

Hi all,

I’m using a form component that contains a list of checkboxes. When a checkbox is selected, I expect its associated value to be returned in the widget’s data list.

Instead, the data list only returns `true` or `false`, which appears to correspond to the index or selected state of each checkbox rather than its configured value.

Is it not suppose to just return a list of values based on what I selected ie,

`['Administrator']` or `['Administrator','Operator']`

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/e/ae28ae9104489181f06915b0afc48dd3dd8c017d.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/4/b4a524eec9827d877f4a170afe10f5dab9a0003a.png)

```json
{
  "id": "roles",
  "type": "checkbox",
  "checkbox": {
    "type": "boolean",
    "options": [
      {
        "text": "Administrator",
        "value": "Administrator",
        "triState": false
      },
      {
        "text": "Operator",
        "value": "Operator",
        "triState": false
      },
      {
        "text": "Supervisor",
        "value": "Supervisor",
        "triState": false
      },
      {
        "text": "test",
        "value": "test",
        "triState": false
      }
    ],
    "layout": "row",
    "align": "center",
    "justify": "start",
    "textPosition": "right",
    "checkedIcon": {
      "path": "material/check_box",
      "color": {
        "enabled": "#5b9cf6",
        "disabled": ""
      }
    },
    "uncheckedIcon": {
      "path": "material/check_box_outline_blank",
      "color": {
        "enabled": "",
        "disabled": ""
      }
    },
    "validation": {
      "constraints": {
        "required": {
          "enabled": false
        }
      },
      "style": {
        "classes": ""
      }
    },
    "style": {
      "classes": "keycloak-role-chips"
    },
    "optionStyle": {
      "classes": "keycloak-role-chip"
    }
  },
  "visible": true,
  "enabled": true,
  "layout": "column",
  "label": {
    "text": "Roles",
    "style": {
      "classes": "keycloak-label"
    }
  },
  "info": {
    "text": "",
    "type": "caption"
  },
  "tabIndex": 7,
  "style": {
    "classes": "keycloak-form-group"
  }
}

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 28, 2026, 1:13pm UTC](https://forum.inductiveautomation.com/t/form-component-checkbox-not-returning-value/116551/2 "2026-07-28T13:13:56Z")

</div>

No, the value of a checkbox is its boolean state.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 28, 2026, 1:40pm UTC](https://forum.inductiveautomation.com/t/form-component-checkbox-not-returning-value/116551/3 "2026-07-28T13:40:04Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/3/036a0c521f15886972a7ba78c8e990c6347a7921.png)

A boolean can't have a value of type 'string'.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 28, 2026, 2:37pm UTC](https://forum.inductiveautomation.com/t/form-component-checkbox-not-returning-value/116551/4 "2026-07-28T14:37:08Z")

</div>

A crude workaround:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/f/ffa8bf7c209ab121bbb171a4f7768e6baa7c048d.png)

1. Create a custom property 'roles' on the form component.
2. Create a Property binding on the custom prop.
3. Monitor the `data.roles` of the form.
4. When it changes generate the list using the script below.

```python
def transform(self, value, quality, timestamp):
    options = ["Administrator", "Operator", "Supervisor", "test"]
    selected = []
    for r in range(len(self.props.data.roles)):
        if value[r]:
            selected.append(options[r])
            
    return selected

```

This has the problem that you now have to keep the options list synchronised with the form options. This won't be obvious to anyone else editing the application later.

If you're smart you could modify the script to iterate through the `columns.items.0.rows.items` searching for `widget.0.roles` and then iterate through that node's `checkbox.options` and extract the `text` properties and pop them into my `options` array above. If I was smart I'd show you how. 🙄

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 28, 2026, 2:45pm UTC](https://forum.inductiveautomation.com/t/form-component-checkbox-not-returning-value/116551/5 "2026-07-28T14:45:31Z")

</div>

The trouble with scripted work-arounds (or any kind of bindings within the form component) is that they cannot work in offline mode, a key feature of the form component.

The association between the checked boxes and the text strings needs to be performed in the form delivery event, not in any binding.

---

<div class="post-metadata">

**Author:** ![pamato](https://avatars.discourse-cdn.com/v4/letter/p/c68b51/32.png) [@pamato](https://forum.inductiveautomation.com/u/pamato)\
**Post date:** [July 28, 2026, 5:36pm UTC](https://forum.inductiveautomation.com/t/form-component-checkbox-not-returning-value/116551/6 "2026-07-28T17:36:13Z")

</div>

No work-around needed. There is a `type` prop under `widget.checkbox` to flip the data type expected. Options are boolean and string.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 28, 2026, 5:46pm UTC](https://forum.inductiveautomation.com/t/form-component-checkbox-not-returning-value/116551/7 "2026-07-28T17:46:12Z")

</div>

> [@pamato](#):
>
> No work-around needed.

Ooooo! Neat!
