Show and hide list based on Checkbox

omidhz 07 Jun, 2015
I'm trying to make a form that shows/hides some elements but I'm having a problem.
Here is what I need to do. I have a checkbox group with multiple checkboxes (example: item 1, item 2, item 3). Also I have three dropdown lists (list 1, list 2 and list 3). I need the lists to be hidden when the page loads. Then when user checks any checkbox for items 1, 2 or 3 corresponding lists (1, 2, or 3) become visible.
I can handle this with events and it works fine.

The problem is, I want when the user unchecks an item, the list related to that item to hide again. This is not happening. When I uncheck the box, the list is still visible.

How can I fix this?
omidhz 07 Jun, 2015
I did review the code that calculus00 recommended. But the problem with this is that I need to setup multiple checkboxes instead of using a checkbox group. This way, I cannot validate the form so that user selects at least one checkbox. I need to be able to make thee user select at least one checkbox.
GreyHead 08 Jun, 2015
Hi omidhz,

I think I have already replied to this question in another thread?

Bob
This topic is locked and no more replies can be posted.