I am having some problems with the admin of Silverstripe. I defined a database model (see class definitions below), and after I do a dev/build everything is looking as expec
You probably shouldn't only rely on the admin scaffolding, and use getCMSFields
on your DataObjects to customize what happen in the CMS. In you case, a simple replace of the Troupe
dropdown could work, adding this to your Package
class:
function getCMSFields()
{
$fields = parent::getCMSFields();
$troupeList = Troupe::get()->map()->toArray();
$troupeSelect = DropdownField::create('TroupeID', 'Troupe')->setSource($troupeList);
$fields->replaceField('TroupeID', $troupeSelect);
return $fields;
}
This is quite minimalist and a lot more could me customised.