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:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Save formcontent from many:many relation


Go to End


2 Posts   1442 Views

Avatar
esakrielaart

Community Member, 59 Posts

19 July 2011 at 7:23am

Hello all,

I'm currently struggeling with the following. I have some products which are saved in the database. From this products I wish to create packages containing one ore more products. One product may occure in more than one package and one package may contain multiple products: many-many relation between products and packages.
Now I have some problems to create a code to actually save the selected products. I'm capable to create a form where one may enter a Package name and to generate checkboxes per product (using checkboxSetField). I spend many time searching the web to see if SS had any build in feature for this, but I can't find it. Aren't there any? Do you maybe have a suggestion on how to tackle this problem?

Any help appreciated,
Maurice

Avatar
esakrielaart

Community Member, 59 Posts

19 July 2011 at 10:15am

Found this very promising answer, thanks.

http://www.silverstripe.org/form-questions/show/16256?start=0