Forums

Multi-Upload Problem

ShoestringWebs 08 Feb, 2013
I have a fairly simple form in Joomla 2.5.9 and latest Chronoforms. I included a multi-upload function by following the FAQ, although I am not 100% confident that I have the correct info in the "Array Fields" field in the upload files event (entered `upload[]`).

Upon testing, I receive the emailed info but in the file upload field I have " array ( 0 => 'filename.jpg', 1 => 'filename2.jpg', ) " and no files are uploaded to the designated directory.

When I debug, I get this:

Array
(
    [chronoform] => PropertySubmit
    [event] => submit
    [Itemid] => 151
    [option] => com_chronoforms
    [view] => form
    [property_add] => 123 Main Street
    [prop_type] => Office
    [prop_availability] => For Lease
    [sqft_warehouse] => 45,000
    [sqft_office] => 23,000
    [sqft_parking] => 45,000
    [prop_ceiling] => 25
    [bays] => 3
    [prop_description] => description
    [contact] => Fred Flintstone
    [contact_phone] => 678-774-9438
    [email] => bobg@shoestringwebs.com
    [contact_public] => Include contact info in the listing
    [upload] => Array
        (
            [0] => girl_with_deer.jpg
        )

    [multi_upload_limit_upload] => 2
    [input_submit] => Submit
    [501664cd25d28250067c7ec0149ed2ee] => 1
    [_PLUGINS_] => Array
        (
            [upload_files] => Array
                (
                )

        )

)

Validation Errors:

Array
(
)


(In a probably-unrelated problem... the "instructions for users" doesn't appear on the form for the file upload element.)

Thanks in advance for your help. I love this component, but I've run out of licenses! Time to buy more.
GreyHead 09 Feb, 2013
Hi ShoeStringWebs,

Both entries in the Upload Files action are without the [].

Have you added the enctype . . . attribute to the Submit URL? Leaving that out will give results like these?

Bob

PS You're right about the User Info not showing, I've added a note to the FAQ to say this.
ShoestringWebs 09 Feb, 2013
Should the "Form tag attachment" field retain the entered data? When I hit "Save," the field is cleared. Tried Firefox latest and Chrome latest.

GreyHead 09 Feb, 2013
Hi ShoeStringWeb,

That saves OK here :-(

Please try with single quotes and see if that works better . . . enctype='multipart/form-data'

Bob
ShoestringWebs 09 Feb, 2013
The single quotes worked. Thank you very much for the help! But a related question:

I want to attach the uploaded files to the email sent to me. I had named the file upload field < upload >, so I added < upload > to the "Attachments fields name" field in the Email action. I also tried < upload[] > with no success.

I also just tried < upload1,upload2,upload3,... > . I note that, in the auto-generated email template, empty brackets {} are returned for the file upload action.
GreyHead 09 Feb, 2013
Hi ShoeStringWeb,

You could try this FAQ for attaching them in a zip file. You can't add an array directly to the standard Email action Attachments box - I think it will work OK with my Email [GH] action though.

Bob
pindrix 21 Feb, 2013
Hi

I had the same problem , and i did everything like in FAQ , but if i try to submit the file i get this . ( 1 is name of the file array).

pls help
GreyHead 21 Feb, 2013
Hi pindrix,

You can't use input names that start with numbers - because they get converted into PHP variable and other things that don't permit that format. Try using e.g. x1 as the name.

Bob
pindrix 26 Feb, 2013
hi

Well I tried a few of different names like file[], x1[] as you said , but Im still getting that screen. I dont understand that . I looked into upload settings and the files config string and the max size are okay.
GreyHead 26 Feb, 2013
Hi pindrix,

Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
pindrix 27 Feb, 2013
hi

OK I have sent you a PM . Please take a look into it , thank you .
GreyHead 27 Feb, 2013
Hi pindrix,

It looks as though the Multi-File Upload can't be run from the Easy Wizard :-(

If you switch to the Form Wizard (the setting is on the General Tab); then open the File upload action, go to the Advanced Tab and put the input name subor into the Arrays box there the upload appears to work correctly.

Bob
pindrix 28 Feb, 2013
hi

😢 Well I tried as you said but it still won't work . I have changed form wizard mode from easy to advanced(default) , then I go into File upload action - Advanced Tab - array fields - .... if I write in subor, it apears to upload the file but doesn't attach it to email and sent. If I write in subor[], then i get again that screen .

Pls can you pm me a backup of that array i sent you that works correctly ?

Thx in advance.
GreyHead 28 Feb, 2013
Hi pindrix,

Do you have subor in the Attachments box in the Email action? and is the Email action enabled?

I don't have email on the site I tested on so disabled it. We've had this working OK in other cases though.

Bob
This topic is locked and no more replies can be posted.