Working with checkboxes and arrays

Hi there,
I have the following task that I want to accomplish.

I have three groups of checkboxes

When a checkbox of group one in clicked I want the user to be able to click on one of the other two groups checkboxes.

If he clicks on the checkbox of the second group, the checkbox of the third group will disappear (this is ok I can figure out how to do this).

The main issue is that I want to do this with arrays or another way but not save to a database.

I was thinking to have three arrays (one for each checkbox group). Somehow repeat through each array and display a relative number of checkboxes for each group.

When clicking on group one, to add an element on the other two arrays, and then based on the checkbox group that it was clicked (second or third) to remove an element from the other array. I mean if I click on the second group checkbox to remove an element from the third group, and if click on the third to remove from the second.

The concept is: First group represents a human action.
Second and third group represent the result of the action.
We want to count actions (first group) and results of it (second and third group)

We dont want to store this in a database this is why I thought of n array, but if database easier then I will go with it.

Thank you in advance

Community Page
Last updated: