Hi!
I am trying to use the AssetTableField for linking multiple files to a page, but the selection in AssetTableField does not get saved. Did I miss some point? Any hint is highly appreciated.
Thanks!
<?php
class ContentPage extends Page {
// database relations
public static $db = array(
);
public static $has_one = array(
);
public static $has_many = array(
'Files' => 'File'
);
// fields in CMS
function getCMSFields() {
$fields = parent::getCMSFields();
$downloadsTable = new AssetTableField(
$this,
'Files',
'File',
array(
'Title' => 'Bezeichnung',
'Filename' => 'Dateiname'
)
);
$fields->addFieldToTab('Root.Content.Downloads', $downloadsTable);
return $fields;
}
}
?>