How to create and edit cascading dropdowns for custom tables