Following Situation
I have Dataobjects "Project" which have "has_one" relations to "ProjectPage"
following code in the dataobject projects:
public function getCMSFields_forPopup()
{
$pData = (DataObject::get('ProjectPage'));
if ($pData) {
$ProjectPageSource = $pData->toDropDownMap();
}
$fields->push(new DropdownField(
'ProjectPage',
'ProjectPage',
$ProjectPageSource,
$this
));
....}
In the Admin it renders a perfect DropDown List of all my other ProjectPage Pages.
Sadly it never saves!
I think i remember that i'm suppost to use "ProjectPageID" as first Argument to "DropdownFiled" - but then i get an empty DropDown Box.
Where's my Bug?
Thanks a Lot