Nested checkbox list

Nested checkbox list

Hi, 

I am wondering if it might be possible to accomplish the following through deluge and a standard form (seems you can do it as a html page but I'd rather not go there). I have a set of checkbox lists that look like this 

Checkbox 1
Checkbox 2
Checkbox 3
Checkbox 4

These items are not hard coded but rather are dynamically added from a table in the application. What I need to be able to do is to nest some items under each checkbox. So for example, if you click on checkbox 1 you would see something like:

Checkbox 1
      Item 1A
      Item 1B
      item 1C
Checkbox 2
Checkbox 3
Checkbox 4

And hopefully if I click on Item 1B I would see something like:

Checkbox 1
      Item 1A
      Item 1B
            SubItem1
            Subitem2
            Subitem3
      item 1C
Checkbox 2
Checkbox 3
Checkbox 4

I have accomplished something similar by using different lists for each of the levels but the items aren't visually tied to each other through their proximity and this creates an inferior using experience. I have played around with dynamically generating a new list every time an item is clicked but I can't see to be able to sort and arrange the items correctly. Has anyone done something like this? Can you offer any insight? 

Thanks,
John