Hi there, I still have problems with SimpleTreeDropdownFiled and TreeDropdownField inside the Javascript Popup.
I have a collection of the following Class:
class Overview extends DataObject{
static $db = array (
'LinkTitle' => 'Text',
'LinkTeaser' => 'Text'
);
static $has_one = array (
'OverviewTarget' => 'SiteTree'
);
public function getCMSFields_forPopup(){
return new FieldSet(
new TextField('LinkTitle', "Link Titel:"),
new TextField('LinkTeaser', "Link Teaser:"),
new SimpleTreeDropdownField('OverviewTarget', "Link Ziel:", 'SiteTree')
);
}
}
The Problem is, that the value from the SimpleTreeDropdownField isn't saved.
I'm trying to read OververviewTarget and OverviewTargetID but both values are empty or always showing the value "1".
I also tried to use the Following line (as needed in TreeDropdoewnFiled)
new SimpleTreeDropdownField('OverviewTargetID', "Link Ziel:", 'SiteTree')
but when using OverviewTargetID insted of OverviewTarget the Dropdown doesn't appear in the Popup.
The same is happening to TreeDropdownField. It doesn't appear when using OverviewTargetID and it's not saving the value when using OverviewTarget.
What am I doing wrong, or is there just a simple error in Silverstripe 2.3.2 / 2.3.3?