Progress bar content and progress based on repeating group

Hi All,

Bit of a complicated use case for the progress bar Plugin.

I have one repeating group (which is 2 columns x 2 rows), and each repeating group has 3x Checkboxes in it and one progress bar. As you check the checkbox, the progress bar begins to fill up (33% for one, 66% for two, 100% for three). This part works fine.

What I want though is a master progress bar, that fills up based on the progress bars in the repeating groups being filled.

So as an example, say if the repeating group has 2 entries in it (each with 3x checkboxes and one progress bar, so a total of 6x checkboxes and two progress bars).

When you check a checkbox, the progress bar in the repeating group should move to 33%, but because there’s two entries in the repeating group the master progress bar should move to 16.6%. When you’ve ticked all three checkboxes in one repeating group, the progress bar in the repeating group would be 100% and the master progress bar would be 50%.

I’ve got the progress bar working in the repeating group fine by using a heap of conditions (i.e if one checkbox is checked and the other two are unchecked, percentage is 33%, if two checkboxes are checked and one is unchecked, percentage is 66% etc etc) however I can’t find a way to do this with the master checkbox as the percentage set is based on how many entries the repeating group has.

Hope this makes sense, even I’m confused typing this out.

Thanks!

I think the way to structure this would be to set a custom state on the page for the number of checkboxes on the page and set it on page load (perhaps it’s 3 times the number of cells in your RG, if I’m understanding correctly). Then have a separate custom state for the number that are checked. Each time a new one is checked, make it 1 higher. And, when one is unchecked, make it one lower.

Then, set the mast progress bar = no. checked / total number.

Thanks that’s awesome, the one part I can’t get working is to add or subtract one, what are you using to do this?

Thank you for this awesome information.
Regards,
Digital Marketing Course in Chennai