Buy Now
Sign in

Chronoforms v6 Repeater Area Multiple File Uploads

gatekeepa123 , March 31 at 08:22
G
gatekeepa123
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
H
healyhatman
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.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
G
gatekeepa123
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
Attachments
designer.jpg
designer.jpg
(336.4 KiB)
306 Downloads/Views
setup.jpg
setup.jpg
(377.28 KiB)
311 Downloads/Views
admin
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
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
G
gatekeepa123
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
Attachments
repeater-file.png
repeater-file.png
(49.31 KiB)
280 Downloads/Views
H
healyhatman
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.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
G
gatekeepa123
Still can't get this to work:
DESIGNER
[img=10501
  • designer_cut.jpg[/img]
  • 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?
    Attachments
    designer_cut.jpg
    designer_cut.jpg
    (325.12 KiB)
    122 Downloads/Views
    setup_cut.jpg
    setup_cut.jpg
    (400.11 KiB)
    233 Downloads/Views
    G
    gatekeepa123
    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
    H
    healyhatman
    Send me deets I'll have a look
    Web developer at SkySpider.com.au
    I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
    G
    gatekeepa123
    Thank you, you have a PM.
    H
    healyhatman
    Some of it was your fault, but most of it was due to bugs in CF. As mentioned in my PM I made it work for you, after a few hours of effort. ​
    ​​
    ​Bug Report: https://www.chronoengine.com/forums/posts/t105593/various-bugs-upload-files-repeaters
    Web developer at SkySpider.com.au
    I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman