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.

Widgets /

Discuss SilverStripe Widgets.

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

ImageField on widget

Go to End

3 Posts   2180 Views


Community Member, 1 Post

1 July 2010 at 3:52am

Hi, I tried using ImageField on my custom widget but I got a php error. Is there anyway I can upload images on widget? Please Help. Thanks.


Community Member, 57 Posts

7 November 2010 at 10:25am

You should be able to include the same data types in a widget as a page. It's probably a misplaced bracket or something - feel free to post the code for another set of eyes to look at it!


Forum Moderator, 1899 Posts

7 November 2010 at 1:55pm

I had this problem a while back and this is my solution...

...there is something to do with the ImageField being in the WidgetAreaEditor that fails it so I ended up choosing an image from a dropdown mapped to a folder in the upload. As a nice touch I show the image saved above the select.