Suppose you have a DataObject named Food. Users can add records using the GridField. When clicking on a GridField to enter detail view, there is a
DropdownField Type with values:
- Fruit
- Vegetables
Then there is a second DropdownField Product When Type is set to Fruit, the values for the second DropdownField are: Apples and Oranges.
If Type is set to Vegetables, the values will be Broccoli and Spinach.
I need to create a dynamic DataObject as such, but I don't know where to begin. This kind of flexibility seems to challenge the framework's flexibility.
- Would I need to create all $db columns in one table?
- Does this rely on AJAX?
- Does anyone have an example code of something that comes close to this?