I'm working on a project (using the CodeIgniter framework) which contains a grid with a lot of checkboxes. On selecting a checkbox, a pop up (twitter bootstrap - modal) appears which contains statements and its respective sub-statements. Statements are to be selected using radio buttons and sub-statements are to be selected using checkboxes.
Eg: If I select the 1st statement, then I'm supposed to select its respective sub-statements and not that of the 2nd. In order to avoid selecting the other sub-statements, I have to disable them. How can I do that?
radio1: statement 1 (enable - selected) chckbox1: sub-stmt1 (selected) chckbox2: sub-stmt2 (may be selected or may not be)
radio2: statement 2 (enable - not selected) chckbox1: sub-stmt1 (disable) chckbox2: sub-stmt2 (disable) chckbox3: sub-stmt3 (disable)
radio3: statement 3 (enable - not selected) chckbox1: sub-stmt1 (disable)
I'm using nested for loops, one for generating radio buttons (statements) and another for checkboxes (sub-statements).