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