#silverstripe IRC Log

IRC log for 7 May 2017

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:14] * ss-helper has joined #silverstripe
3: [00:31:21] * Azure has joined #silverstripe
4: [00:56:19] * gelignite quit (Ping timeout: 260 seconds)
5: [08:03:14] * neilf__ has joined #silverstripe
6: [09:54:53] * gelignite has joined #silverstripe
7: [10:09:45] * neilf__ quit (Quit: Connection closed for inactivity)
8: [12:49:31] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
9: [16:10:49] * gelignite has joined #silverstripe
10: [16:34:51] <DarjusIT> Hi all
11: [16:35:50] <DarjusIT> Is any better calendar in SS admin? for example when I set config on Date field to show calendar, so I could select years also not only days.
12: [18:33:22] * Azure quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13: [20:40:15] * Azure has joined #silverstripe
14: [21:04:37] * Dig has joined #silverstripe
15: [21:07:48] <Dig> Morning all. I don't know if I can explain this well but I'll try :). I have a DataObject that has a has_one relationship to its parent. The parent has a ModelAdmin, so I can use the grid field and 'Add Child' and it'll open a new form and have all the default / blank fields and the Parent already selected and readonly which is perfect. But I want to use populateDefaults to populate the fields of the child based on which parent it has. In populateDefaults
16: [21:07:48] <Dig> $this->ParentID = 0 and its not until onBeforeWrite that I can get find access to the correct ParentID. The data must be somewhere because the correct parent is shown on the form. Any ideas how I can access it?
17: [21:08:57] <Dig> I don't want my users to have to press save to get the correct defaults and then save again to make their changes.
18: [21:43:31] <DarjusIT> Hi Dig, its night for me :)
19: [21:45:19] <DarjusIT> Dig, you want on create child page get all parents data?
20: [21:54:14] <DarjusIT> Maybe some one knows how add classes to gridfield table rows?
21: [22:12:01] * Zauberfisch_ has joined #silverstripe
22: [22:19:17] <DarjusIT> Maybe some one knows how add classes to gridfield table rows?
23: [22:22:33] * Zauberfisch quit (*.net *.split)
24: [22:27:37] * Azure quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
25: [22:34:34] <Dig> DarjusIT, That's correct. The 'defaults' for a child object depend on what the parent's data is.
26: [22:35:24] <Dig> I can set them in onBeforeWrite but that means my users need to save it immediately on create before updating it and that's no good.
27: [23:32:51] * gelignite quit (Quit: http://bit.ly/1kso8Ta)

These logs were automatically created by ss-log on irc.freenode.net.