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

How to get field value from DataObject in custom Image Class


Reply


352 Views

Avatar
Pix

Community Member, 153 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!