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, biapar, Willr, Ingo, swaiba, simon_w

ImageField on widget


Reply

3 Posts   1680 Views

Avatar
robtek

1 July 2010 at 3:52am Community Member, 1 Post

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.

Avatar
MartinPhone

7 November 2010 at 10:25am Community Member, 57 Posts

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!

Avatar
swaiba

7 November 2010 at 1:55pm Forum Moderator, 1796 Posts

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

http://www.silverstripe.org/widgets-2/show/8603#post290372

...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.