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.

General Questions /

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

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

GriedField & many_many relation between DataObjefcts


Reply


366 Views

Avatar
DesignerX.com.au

Community Member, 107 Posts

15 August 2012 at 12:09am

Hi:
I am having a problem with customizing the many_many relation between 2 DataObjects . Following this tutorial http://doc.silverstripe.org/framework/en/tutorials/5-dataobject-relationship-management , GreidField works fine in my code but I cant find a way to use CheckBox instead of a table !
Here is my code .
SGallery extends Page : http://sspaste.com/paste/show/502a34dad57b7
SGalleryImage extends DataObject :http://sspaste.com/paste/show/502a34cbd815b
SGalleryImageCategory extends DataObject : http://sspaste.com/paste/show/502a34e690b6b

I am thinking the problem is on SGalleryImage ? How can I customize the existing griedField or/and change it to CheckBox ?
- I Need a tab where I can add more categories
- I need each SGalleryImage to have a Checkbox list or dropdownSelect to select which categories the Object is related to

If anyone got the time & can help me out ? this also will work a good tutorial on GriedField :)
Thanks