Dynamically Uncheck Checkbox Component

Hi,

How can I dynamically Uncheck a Checkbox, based on another event?
I tried playing around with the checked state logic, but that doesn’t seem to uncheck the box
I should add that my checkboxes are part of a Dynamic Lists

What I am looking for is when I click the toggle to “Positive” or “Negative”, it should reset the the selected checkboxes back to unchecked

Screenshot 2021-10-25 at 15.45.03
Screenshot 2021-10-25 at 15.50.33

Thank you

Hello @Farid

To help you I need to be sure that I understand you

  1. Does the dynamic list form checkboxes or sections with checkboxes(green, red…)?
  2. If the toggle switch from “Positive” to “Negative” does it transform checkboxes labels from “Positive” to “Negative”?
  3. Switching the toggler resets the value of checkboxes in any cases?

Regards,
Viktor

1 Like

Hi

  1. The dynamic list creates checkboxes, based on a list from the DB.
  2. Yes, checkboxes are transformed by toggling the switch - all text on checkbox label comes from DB
  3. No, switching toggle has not impact on rest of checkboxes

Thanks

@Farid

“What I am looking for is when I click the toggle to “Positive” or “Negative”, it should reset the the selected checkboxes back to unchecked”

“No, switching toggle has not impact on rest of checkboxes”

Sorry for the inconvenience, I can’t figure out exactly what the switch should do

Apologies, Yes what I am trying to achieve is when the switch is toggled, it should reset selected checkboxes back to unchecked.

Sorry meant to say switching toggle has no impact on checkboxes being unchecked.

I have tried playing around with checked state logic from both the checkbox and toggle, but cannot get checkbox to reset.

Thanks

@Farid

I have no better idea than storing the state of the checkboxes in the pageData.
The state of checkboxes in pageData is property/key “checkBoxesState”.
“checkBoxesState” is object/collection
Properties/Keys in “checkBoxesState” are checkBoxes IDs with true/false values
Checkbox state looks at its state in the pageData
The event changes the state of the checkbox in the pageData
The switch resets all checkboxes in the pageData

Example











11

I will try to find a simpler solution

Regards
Viktor

1 Like

Will give this a go.

Thank you for your efforts, much appreciated.