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

How to get field value from DataObject in custom Image Class


Go to End


573 Views

Avatar
Pix

Community Member, 158 Posts

26 April 2013 at 11:31am

Edited: 26/04/2013 11:40am

I have a custom Image Class which is attached to a DataObject, and I would like to know how to access the value of a checkbox field in the DataObject from the Image Class. I guess the DataObject is the owner/parent (?). I need to get the value from the Image Class so I know how to process the file when it is uploaded, but I don't know the right syntax or way of doing this. Is it possible?

Thanks for any tips!