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.

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   1644 Views

Avatar
TomDude48

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?

Regards,

Tom

Avatar
KatB

Community Member, 105 Posts

28 February 2008 at 1:26pm

I would be interested in this as well! :)