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.

All other Modules /

Discuss all other Modules here.

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

Has Many Image on The Front Page Form


Reply


5 Posts   1503 Views

Avatar
draft

Community Member, 57 Posts

7 November 2009 at 5:48pm

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 :)

Avatar
draft

Community Member, 57 Posts

7 November 2009 at 5:58pm

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.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

8 November 2009 at 4:36pm

Edited: 08/11/2009 4:36pm

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.

Avatar
draft

Community Member, 57 Posts

8 November 2009 at 7:09pm

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 :)

Avatar
draft

Community Member, 57 Posts

8 November 2009 at 9:42pm

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.