Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

File Upload Field in ManyManyComplexTableField popup

Go to End

21 Posts   4950 Views


Community Member, 30 Posts

22 November 2009 at 4:00am

How does the DOM store it's data compared to the CTF?

Does it work in exactly the same way, so that I can just swap out DOM for CTF and keep all the data and relationships in tact?
The option to reorder entries looks like a real bonus, as that seems to be the biggest flaw with the CTF..

Carbon Crayon

Community Member, 598 Posts

22 November 2009 at 9:04am

Yep, the DOM is just an extention of the CTF class. It pulls in the same data (i.e. DataObjects) and displays them in the same way just adding a new skin, more functionality and a much faster popup window. Honestly I don't think I could go back to a CTF now, it would just seem 98! :)


Community Member, 203 Posts

6 January 2010 at 2:52am

Edited: 06/01/2010 2:53am

I copied the code here after creating my own code from scratch to try and correct an error. The problem is this: When using a FileIFrameField or ImageField I always get the the same message instead of FileIFrameField or ImageField in the popup:

'You can add files once you have saved for the first time.'

I can then save the record in the popup, close it, reopen the record for editing and THEN I can add a file.

I know where this comes from, it has to do with line 14 in sapphire/forms/FileIFrameField.php:

$data = $this->form->getRecord(); // returns no data

Somebody know what I can do about this? (Creating a mysite/forms/MyFileIFrame.php class for instance, but am not sure what to change or add)

EDIT: tested it on 2.3.3 and 2.3.4

Carbon Crayon

Community Member, 598 Posts

6 January 2010 at 3:13am

I don't think you can do anyuthing, this comes from the fact that before you save it the DataObject has no ID so it cannot have relationships like attaching an image. However when using DOM it should refresh when pressing save so that you can add the image strait away without having to open the popup again.



Community Member, 203 Posts

6 January 2010 at 12:27pm

Thanks for the reply - I will look into using DOM.

Go to Top