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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

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

How to handle file upload in custom forms

Go to End

2 Posts   1569 Views


Community Member, 2 Posts

27 February 2008 at 5:00pm

I am trying to build a custom form that writes to a custom class Post (extends DataObject) with file and image uploading. I can't find a code example of how to write the form submit handler for the file form fields (FileField, FileIFrameField, SimpleImageField, ImageField)

Does anybody know where some code examples are to follow or can provide the onSubmit method code?




Community Member, 105 Posts

28 February 2008 at 1:26pm

I would be interested in this as well! :)