Jump to:

1970 Posts in 1275 Topics by 607 members

Form Questions

SilverStripe Forums » Form Questions » SS3 ImageField / UploadField Problem

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

Page: 1 2
Go to End
Author Topic: 2544 Views
  • RobboDev
    Avatar
    Community Member
    20 Posts

    Re: SS3 ImageField / UploadField Problem Link to this post

    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

  • derralf
    Avatar
    Community Member
    24 Posts

    Re: SS3 ImageField / UploadField Problem Link to this post

    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

  • RobboDev
    Avatar
    Community Member
    20 Posts

    Re: SS3 ImageField / UploadField Problem Link to this post

    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.

    2544 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.