Jump to:

10931 Posts in 2614 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » Has Many Image on The Front Page Form

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1449 Views
  • draft
    Avatar
    Community Member
    57 Posts

    Has Many Image on The Front Page Form Link to this post

    Hi,

    I'm looking to find a better and correct way to upload a multiple image on one form at the front page. What i am looking for is for example for user registration, i want the user be able to upload multiple image (probably it's better if it has like an ajax functionality where we can add the file upload field on the form)

    Is it correct if on the Member dataobject i create it like this :

             'has_many' => array(
                'Pic' => 'Image'
             ),

    Then how to create the correct form, so user can upload more than one picture from one process.

    Any help would be appreciated

  • draft
    Avatar
    Community Member
    57 Posts

    Re: Has Many Image on The Front Page Form Link to this post

    Hey actually the functionality i want is exactly like on this forum attach file functionality, see we can browse multiple file then upload it at one time. Can someone please point me a way how to do that?

    Thx.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Has Many Image on The Front Page Form Link to this post

    This is really easy to do with SWFUploadField. I'll post an example when I have a chance.

    Edit: There might be one in the documentation.. I can't remember if I put one up.

  • draft
    Avatar
    Community Member
    57 Posts

    Re: Has Many Image on The Front Page Form Link to this post

    Hey unclecheese,

    Thx so much for your reply, may you give me the sample or the doc please ?

    I found that on this forum, it used FileField , but the thing is i want only to upload image, and SimpleImageField won't do it, because i want multiple upload (if it can show the thumbnail of the image would be better).

    Thx, you always be the man

  • draft
    Avatar
    Community Member
    57 Posts

    Re: Has Many Image on The Front Page Form Link to this post

    Hi Unclecheese,

    I think i got the swfupload working, and you are right, that's quite what i want, but i notice something when using swfupload on the form, if we have validate some field, then we browse the file after we submit, it will upload the file/image first then it will redirect back to the form with the validation, but the file is already uploaded if i checked.

    Can't the ajax/javascript checking still working when using swfupload on the form?

    Thx.

    1449 Views
Page: 1
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.