Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Can I get the DataObjectManager to behave like the ImageGalleryManager?

Go to End



Community Member, 288 Posts

2 December 2009 at 3:22am

Hello UncleCheese!

Today I tried to use two DOM:s in the same way you use one DOM and one IGM in the image gallery module.
Since I'm posting here I obviously failed.

I've gotten partway there.

$cityManager->setFilter('CountryID', 'Choose a country', $this->Countries()->toDropdownMap('ID','Title'));

I get the filter I want but the filter setting isn't used when saving the object. I also tried setting a default value for the filter but I noticed that the select box resets itself everytime you make a choice if you put a value as the last argument in setFilter.

So the questions:
1. Can the option No filter be removed like in IGM?
2. Is the select box supposed to reset when making a choice if the default value is set?
3. Can the value from the filter box be used when creating new objects just like for the IGM?