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.

Form Questions /

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

SS3 ImageField / UploadField Problem


Go to End


11 Posts   5749 Views

Avatar
Rob Clarkson

Community Member, 26 Posts

29 July 2012 at 11:50pm

Nice one mate from the looks of things you know what you're doing, whereas I am just blundering about like a drunk elephant in a china shop

Avatar
derralf

Community Member, 28 Posts

20 December 2012 at 9:23pm

Hi,
any news on this?
I'm having the same problem (mail form on frontend with UploadField to upload/sen an attachment).
Files are being uploaded but in the form action i get an empty file/upload array in $data.
I need to upload multiple files, so using FileField is not a suitable solution for me.

However i managed to disable the from-files-button like this:
http://www.silverstripe.org/form-questions/show/20225#post315078

Ralf

Avatar
Rob Clarkson

Community Member, 26 Posts

20 December 2012 at 11:03pm

Hey broski,

I gave up and used "FileField" on the front end. Then let the relationship do its magic and save the stuff.

$fields->add(new FileField("Pic", "Advert Image"));

Seems to work OK. However, now that SS 3.0.3 is out they might have fixed it up. I had a feeling it was something to do with the object needing to be created before the picture could be uploaded (as you have to do in the backend).

Good luck and merry christmas.

Go to Top