Hello!
I've got the front page of a site showing a slideshow, which uses images selected by the user through the CMS.
The code added to the back end is as follows:
class HomePage extends Page {
static $many_many = array (
'FrontImages' => 'Image'
);
static $allowed_children = '';
public function getCMSFields() {
$fields = parent::getCMSFields();
$f = new UploadField('FrontImages', 'Front Images (Maximum of 10 images. Allowed files: .jpg, .jpeg, .png or .gif)', $this->FrontImages());
$f ->setConfig('allowedMaxFileNumber', 10)
->setFolderName('images/frontpage/')
->getValidator()->setAllowedExtensions(array('jpg', 'jpeg', 'png', 'gif'));
$fields->addFieldToTab('Root.Images', $f);
return $fields;
}
}
This loads the boxes fine. However (as shown in the screenshot), there's no remove or delete buttons for the already uploaded images. Any help would be appreciated :)
Thanks in advance!