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.

Widgets /

Discuss SilverStripe Widgets.

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

Use has_many in widget

Go to End

2 Posts   1341 Views


Community Member, 43 Posts

20 November 2010 at 12:52am


is there a way to use hay_many in a widget?

I can't find a way to get this to work in the gui.
DataObjectManager won't work. It displays a list, but when you try to add an entry, the popup opens and shows the 404 Page.
HasManyComplexTableField breaks the page completely.

Any other ideas?



Forum Moderator, 1899 Posts

27 November 2010 at 3:47am

Just an idea, but how about using a checkboxset field? You might have to do some magic to implode/explode the values into a "Text" field and then again explode it as required.

I've looked at the widgeteditor a bit to try (and talked to some other cleverer ss people) and do nice stuff you can use on forms, but it is restricted due to the way the id's of the fields are translated to be like multi-dimensional arrays - but hey it might be possible I just don't know how :)