Hi everyone
I'm making a simple dropdown in the CMS based on Dataobject::get, but how can I push a default value into the dropdownmap?
This is how my dropdown looks now:
DataobjectResult1
DataobjectResult2
DataobjectResult3
etc...
But I would like to push in a default value in the beginning, like so:
None choosen
DataobjectResult1
DataobjectResult2
DataobjectResult3
etc...
Here's my code by the way:
$zoneDropdown = Dataobject::get("ItalyZonePage", "ParentID = $this->ParentID")->toDropdownMap("ID", "Title");
$fields->addFieldToTab("Root.Content.Main", new DropdownField(
'ZoneID',
'Vælg Zone',
$zoneDropdown
));
Hope someone can help, thanks!
Joel