View more context

 

zemiacsik
Files: Requires logging in with Slack to view/download
Untitled
Lee

@zemiacsik Thanks, with the help of this http://www.balbuss.com/multiple-has-manys-of-the-same-class/ I think I have it sort of

Show 1 attachment(s)
balbuss.com  
Multiple has_many's of the same class « Balbus SilverStripe Things

In silverStripe you can map one-to-many relations involving the same classes, by using dot-notation. But implementing a couple of ComplexTableField to manage them requires a bit more...

Hide attachment content
zemiacsik

Yes, exactly, you need that dot notation (e.g. $has_many = array('Menus' => 'Menu.OrdinaryMenu', 'Specials' => 'Menu.Spaciality') )

👍 (1)
stephanus

in SS3, is it possible to change the behaviour of GridField_FormAction to submit the form with additional data from nearest dropdown within the same form?

stephanus

I want the default gridfield export button to filter the list based on the dropdown that I place on that gridfield form

zemiacsik

@stephanus are you in model admin? i.e. you have a filter with added dropdown?

wmk

@stephanus that's default behaviour.... first load the filtered data, then you can export it

customPhpDev

How can I validate Upload Field for max file size for 2 MB?

customPhpDev

$uploadPhoto->setConfig('allowedMaxFileSize',2); or $uploadPhoto->setAllowedMaxFileSize(2); is not working for me.