23552 Posts in 19349 Topics by 2891 members
|Go to End|
26 February 2014 at 6:03am
So, I have a dataobject type, which is managed from the CMS. One of the page types in my site can have one or more of these dataobjects assigned.
public static $belongs_many_many = array(
'DataObjectList' => 'MyDataObject',
public static $many_many = array(
'Pages' => 'MyPage'
The page type has a listboxfield with multiselect set to true and populated with all of the available dataobjects, like so:
$dropdown = new ListboxField('DataObjectList', _t('DATAOBJECTS', 'Data Objects'), DataObject::get('MyDataObject', "", 'Name DESC')->toDropDownMap());
$fields->addFieldToTab('Root.Content.Main', $dropdown, 'Content');
Now, this displays fine in the CMS admin, but when one or more items are selected in the admin, they don't save. What do I need to do to make this happen?
27 February 2014 at 5:31am
Anybody? It's driving me nuts.
|Go to Top|