I have a very long form, which uses checkboxes to trigger follow up fields with rules to become shown. I have a duplicate of each checkbox at the end of the form, and a custom JavaScript that ensures the mirrored checkboxes always match.
The checkboxes follow a pattern with their client id variables: a1, a2, a3, b1, be, etc... The mirror for each is assigned a client id variable of a1Match, a2Match, etc...
My script is really long and redundant. I know there has to be a way to loop it, but when I try to use (this) or something similar, it gets the SharePoint HTML Element id, instead of the assigned is client variable.
Any tips for looping patterned client id variables would be appreciated.