I am building a module that will have a bunch of checkboxes to enable the addition of metatags like HandheldFriendly, MobileOptimized, etc.
I want to have the first checkbox only displayed. Upon checking that item, other options should appear. (if itemA == checked, then show itemB) I actually have that working. The problem is that if you check itemA and then check itemB and save, but then uncheck itemA, when you return to the configuration page itemB will still have a value.
Here is a simple timeline showing the issue
Snapshot #1: itemA: unchecked itemB: unchecked (invisible)
Snapshot #2: itemA: checked itemB: unchecked (visible)
Snapshot #3: itemA: checked itemB: checked (visible)
Snapshot #4: itemA: unchecked itemB: checked (invisible) // PROBLEM
Between each snapshot, the form was saved. How can I automatically hide AND uncheck the value for itemB when clicking itemA so that when I re-enable itemA, itemB is still unchecked?
If I need to provide further clarification, I can.