Resetting Variables in repeat

I have a variable in a repeat which sets to 1 when the item is selected and 0 when it it not.
This then goes to a form with the productID and the form gets submitted.

However when the form has gone through and I reopen the modal the divs that have been set to var=1 are still showing green.
Is there a way I reset ALL var=0 when the form is submitted in the repeat region?

Community Page
Last updated: