public function getCMSFields() { $pageDropDown = new DropdownField('SiteTreeID', 'LinkedPage', SiteTree::get()->sort('Title')->map('ID', 'Title')); $pageDropDown->setEmptyString('(Select Page)'); $fields = parent::getCMSFields(); $fields->push($pageDropDown); $fields->push(new TextField('LinkLabel')); return $fields; }
public function getCMSFields() { $locationDropDown = new DropdownField('LocationID', 'Choose Location', $this->getLocationOptions()); $locationDropDown->setEmptyString('(Select Location)'); $locationDropDown->setDescription('Create new Locations in Model Admin'); $fields = parent::getCMSFields(); $fields->push($locationDropDown); return $fields; }