# "On init value change" not firing for checkbox within a display collection

**URL:** <https://community.weweb.io/t/on-init-value-change-not-firing-for-checkbox-within-a-display-collection/9885>\
**Category:** How do I?\
**Created:** [July 23, 2024, 4:23am UTC](https://community.weweb.io/t/on-init-value-change-not-firing-for-checkbox-within-a-display-collection/9885 "2024-07-23T04:23:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kanepaamauloa](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/kanepaamauloa/32/8944_2.png) [@kanepaamauloa](https://community.weweb.io/u/kanepaamauloa)\
**Post date:** [July 23, 2024, 4:23am UTC](https://community.weweb.io/t/on-init-value-change-not-firing-for-checkbox-within-a-display-collection/9885/1 "2024-07-23T04:23:49Z")

</div>

I have a list of checkboxes being displayed from a data collection.

 ![CleanShot 2024-07-23 at 00.13.48@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/7f508fb9d79db8af2b0efae27f0e7fb2456dd8fc.jpeg)

- I set a workflow to fire on the “On init value change”

- Each checkbox init value is set to off  

When I go to preview mode and click on a checkbox, the event is triggered, and, therefore, no output is displayed in the console.

The weird thing is that I have this type of workflow with checkboxes working elsewhere but here…

What am I missing here?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 23, 2024, 5:26am UTC](https://community.weweb.io/t/on-init-value-change-not-firing-for-checkbox-within-a-display-collection/9885/2 "2024-07-23T05:26:47Z")

</div>

init value change gets triggered when the initial value is bound to a variable and you change that variable.  
if you want to execute a workflow when the user clicks on the checkbox and changes the value you need to use the on change trigger.  
it’s easy to get confused because a common pattern with input is to bind a variable to the initial value and update that variable with the on change trigger

---

<div class="post-metadata">

**Author:** ![kanepaamauloa](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/kanepaamauloa/32/8944_2.png) [@kanepaamauloa](https://community.weweb.io/u/kanepaamauloa)\
**Post date:** [July 23, 2024, 4:33pm UTC](https://community.weweb.io/t/on-init-value-change-not-firing-for-checkbox-within-a-display-collection/9885/3 "2024-07-23T16:33:45Z")

</div>

Thanks @dorilama!

I have “Init value” bound to a formula now, which checks to see if the selected checkbox’s ID exists in a list of selected IDs.

Even with that bound, the workflow is not triggering.

 ![CleanShot 2024-07-23 at 12.32.33@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bc92f6660a0e356313dd7bad7bb3f0f6f81f0fcb.png)

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 23, 2024, 5:26pm UTC](https://community.weweb.io/t/on-init-value-change-not-firing-for-checkbox-within-a-display-collection/9885/4 "2024-07-23T17:26:59Z")

</div>

that’s because the “init value change” is triggered only when the bound initial value is changed.  
in your case it will trigger if you change the value of the variables used in the calculation in a way that results in the opposite value.

if you want to trigger a workflow when the user manually checks/unchecks the checkbox you need to use the “on change” trigger.
