ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Chronoforms v6 Repeater Area Multiple File Uploads

gatekeepa123 31 Mar, 2018
Hi there,

I'm trying to setup a form, where the user can upload up to seven pdf-files (minimum one file). I get to the point where just the first file from the repeater area is attached to the email but all other uploads are ignored when I use the "Auto attach file fields" option.

- How can I setup the form, so that all file files are added in Chronoforms v6?

- Is there a way to just send the files via eMail without an upload?

-- If not: How can I make sure to secure the upload folder against external requests and delete the uploaded files after the eMail has been sent (of course only the files, that where uploaded before ONE specific email)

DESIGNER

designer.jpg

SETUP

setup.jpg

As always thank you very much in advance and best regards,

Marc
healyhatman 04 Apr, 2018
EDIT: data provider was wrong

For your File Field, set its Name to multiplier[files][{var:area_repeater12.key}]

If it doesn't upload all the files now, you will need a Loop Event in Submit. Data provider should be {data:multiplier.files}
Then you will need a File Upload action in the Loop Event body.

That's a good starting point, try figure the rest out I have to go do school pickup.
gatekeepa123 09 Apr, 2018
Hey healyhatman,

thank you for your help.

Please keep in mind that i'm not familiar with the cf6 syntax (I had this thing working in cf5, but now I'm really lost...)

I added your suggestions to the setup:

DESIGNER

designer.jpg

SETUP

setup.jpg

Getting this error now: Warning: Illegal string offset 'name' in/.../libraries/cegcore2/admin/extensions/chronofc/functions/email/email_output.phpon line121

Did I add your solution to the correct fields?

Best regards,

Marc
Max_admin 11 Apr, 2018
Hi,

Since the fields are inside a repeater, the field name should be an array and should include the repeater key:
field_name[{var:repeater_name.key}]
That should help solve the problem, you may also try to disable the "Upload/attach" settings in the field settings and add the field name to the "upload action" and "Email" actions manually.

A debug action should show you if the fields are processed and attached or not.

Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
gatekeepa123 11 Apr, 2018
Hey,

I really have a hard time following you guys since I dont understand the terms and cant find the fields or settings for "field_name", "key", "repeater_name", etc. Also I dont get how I can add the field names manually, because I dont understand the cf6 syntax.

My new settings (I know they're wrong):

repeater-file.png

Still getting the error: Warning: Illegal string offset 'name' ./libraries/cegcore2/admin/extensions/chronofc/functions/email/email_output.phpon line121
healyhatman 11 Apr, 2018
Field name is the name of the field whose data you want. Repeater is the black label tag next to your repeater element. Key should just be key.
gatekeepa123 01 May, 2018
Still can't get this to work:

DESIGNER

designer_cut.jpg

SETUP

setup_cut.jpg

DEBUGGER OUTPUT
Array
(
    [chronoform] => bewerbung
    [event] => submit
    [stelle] => bewerbung
    [vorname] => 
    [nachname] => 
    [email_adresse] => 
    [telefon] => 
    [aufmerksam] => _blubb
    [datei1] => pdftest1.pdf
    [field_file13] => Array
        (
            [0] => pdftest2.pdf
        )

    [_ga] => GA1.2.1717002363.1524294166
    [a04cae1d53443f3b764d42382513dbeb] => fe6589138cd104d364553f2e50212644
    [0addbd0955010534be7d7bbeea20a0de] => 04bd51fc7d2497397c396f6c42ca2997
    [language] => de-DE
    [Itemid] => 406
    [option] => com_content
    [lang] => de-DE
    [view] => article
    [id] => 159
)
Array
(
    [validate_fields2] => Array
        (
            [log] => Automatic validation enabled.
            [var] => 1
        )

    [upload5] => Array
        (
            [path] => .../components/com_chronoforms6/chronoforms/uploads/
            [field_file13[{var] => Array
                (
                    [extensions] => Array
                        (
                            [0] => area_repeater12.key}]
                        )

                    [info] => File is not present.
                )

            [field_file6] => Array
                (
                    [extensions] => Array
                        (
                            [0] => 
                        )

                    [info] => File is not present.
                )

            [var] => Array
                (
                )

        )

    [email3] => Array
        (
            [recipients] => Array
                (
                    [0] => _BLANKED_
                )

            [subject] => _BLANKED_
            [body] => <h1>_BLANKED_</h1>
... _BLANKED_ ...
<h2>Unterlagen</h2>
Folgende Dateien wurden angehängt:<br/><br/>
pdf1.pdf<br/>
<br/>
<br/><br/>


<br/><br/><br/>
<hr/>

            [files] => Array
                (
                    [0] => field_file13[]
                    [1] => field_file6
                )

            [result] => the Mail could not be sent.
            [var] => 
        )

)

@Max: I sent you a private message with a joomla login to my site; maybe you have the time to take a look?
gatekeepa123 17 May, 2018
The problem is becoming quite urgent now, because my client wants to launch soon.

Max or Bob: Can you please take a look?

Best regards,

Marc
healyhatman 17 May, 2018
Send me deets I'll have a look
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com