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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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


655 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!