No time to review your code but what I can offer is an example (a complex though!):
You can check the FCO ItemSaver code for example, file src/FCOIS_SettingsMenu.lua
In the upper part of function BuildAddonMenu you'll find several dynamically created (via loops) settings menus submenus containing checkboxes, dropdown etc.
Hope the code helps you.
|