Silverstripe Version: 4.5
Question:
I have set up the following:
class Trip extends DataObject
{
private static $many_many = [
"Clients" => [
'through' => Booking::class,
'from' => 'Trip',
'to' => 'Client',
]
];
}
class Client extends Member
{
private static $belongs_many_many = [
'Trips' => Trip::class,
];
}
class Booking extends DataObject
{
private static $db = [
'Status' => 'Enum("unconfirmed,confirmed","unconfirmed")',
];
private static $has_one = [
'Trip' => Trip::class,
'Client' => Client::class,
];
}
Iâve set up a Clients GridField (in the Trip Details form in CMS) with editable columns. Iâd like to be able to add the Booking.Status field as an editable field, but havenât figured out how to do so. Eg. a row in GridField would show Client.Name, Client.Email, Booking.Status (all fields except Booking.Status are already working fine).
Any help would be much appreciated!