Forums

Issue with Repeater Fields for File Uploads

spytech 08 Dec, 2018
Hi, I had some help from Bob a while ago to allow me to add a repeater section and the add those items within an email, this was for text fields.

I need to do this for files. I have taken the same code but it does not seem to work, it puts the line items in the email which is great but does not upload the photos.
Can you let me know what I am doing wrong, see attached file for details.

​[file=11262]Main_Design_Area.docx[/file]
healyhatman 08 Dec, 2018
Numerous posts on this.

Name the file field file[{var:area_repeater#.key}] or something along those lines
In your file upload action you need the name of the field without the bracket part, and the extension. So, say, file:PNG,JPG, jpeg you can't rely on auto add
spytech 12 Dec, 2018
Hi, I have seen the various posts but unfortunately none of them quite match mine.

I have followed your instructions above but still does not work. To be sure, I did as above:


1. Named my file upload field to be: [{var:area_[strong]repeater[/strong]19.key}] - The repeater field is 'area_repeater19'
2. In my file upload action, in the field called 'File name provider' i added '{var:area_repeater19.key}' removing the brackets as described above.

How do I now get the file links to show up in my email, as I want the email to have the clickable links to the files.

Thanks.
spytech 15 Dec, 2018
Hi, any thoughts on my question above?
healyhatman 15 Dec, 2018
Needs to be somename[{var:area_repater#.key}]
spytech 15 Dec, 2018
Sorry not sure what you mean by somename, do you mean same name? And are you saying use # instead of '19'?
healyhatman 15 Dec, 2018
somename as in you need to have SOMETHING in front of the brackets. Like "customerID[{var:area_repeater19}]". And I used # as a placeholder - you should use 19 in your case.
Max_admin 07 Jan, 2019
Hello,

The 2 important steps for this to work are:
  1. The file field name should be something like: file6[{var:area_repeater1.key}], where "area_repeater1" is the name of the repeater.
  2. In the Upload files action, add this to the "Custom files config": file6:pdf,png,jpg (or any extensions you need)
Best regards,
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
spytech 14 Jan, 2019
Hi Max,

Thanks for the feedback, I followed your two points. These changes made it so that the files have been uploaded. The only issue is that they are not attached to the email even though I say Attach in the email 'Auto Attach File Fields', am I missing something? How do I get them to attach?

See below for details:

Thanks
Paul.

Array
(
    [chronoform] => instrument-submission-bob
    [event] => submit
    [title] => Mr
    [first_name] => Mike
    [last_name] => The Bike
    [email_address] => paul@spytech.co.uk
    [telephone_number] => 97987987897
    [enquiry_type] => Certificate
    [enquiry_type_other] => 
    [instrument_details] => dvdf fd fd fd
    [button14] => 
    [_ga] => GA1.3.1370353196.1532495600
    [nrid] => 114480c7c1e3481b
    [cd1da2a6f01a38c43731b5371c1bb403] => 94aa48b90b031fa7ab7b637c2d555ad6
    [77db7af04126bf61bc610a36149e026b] => a885f2364f754b615b8a0204e8af599a
    [_gid] => GA1.3.1439698830.1547452187
    [3f57914d4ef88dea53422c588a36d301] => 9
    [_gat_gtag_UA_4586418_1] => 1
    [Itemid] => 214
    [option] => com_content
    [view] => article
    [id] => 74
    [file99] => Array
        (
            [0] => 20190114081137_hedgehog-banner-2.jpg
            [1] => 20190114081137_settings-512.png
            [2] => 20190114081137_badge-hedgehog.png
        )

    [instrument-submission-bob] => 
)

Array
(
    [upload3] => Array
        (
            [path] => /*******/**/****/*****/*****/components/com_chronoforms6/chronoforms/uploads/
            [file99] => Array
                (
                    [extensions] => Array
                        (
                            [0] => png
                            [1] => jpg
                            [2] => jpeg
                            [3] => gif
                        )

                    [saved] => 0
                )

            [file[0]] => Array
                (
                    [extensions] => Array
                        (
                            [0] => jpg
                            [1] => jpeg
                            [2] => png
                            [3] => gif
                            [4] => pdf
                            [5] => doc
                            [6] => docx
                            [7] => txt
                            [8] => zip
                        )

                    [info] => File is not present.
                )

            [file99[0]] => Array
                (
                    [extensions] => Array
                        (
                            [0] => jpg
                            [1] => jpeg
                            [2] => png
                            [3] => gif
                            [4] => pdf
                            [5] => doc
                            [6] => docx
                            [7] => txt
                            [8] => zip
                        )

                    [info] => File is not present.
                )

            [var] => 
        )

    [email4] => Array
        (
            [recipients] => Array
                (
                    [0] => paul@i4creating.com
                    [1] => getintouch@thomasmartin.co.uk
                )

            [subject] => Sell your Bass Submission
            [body] => Dear T&G Martin,

You have received a website submission for Selling a Bass from: Mr Mike The Bike
<br />
Here are the lists of photos submitted - Thanks:<br /><br />


Regards
Your Website
<table width="100%" cellpadding="5" cellspacing="3" border="0" class="ui table"><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Mr</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Mike</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">The Bike</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">paul@spytech.co.uk</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">97987987897</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Certificate</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left"></td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">dvdf fd fd fd</td></tr><tr><td width="30%" valign="top" align="right"><strong>Upload Your Photo</strong></td><td width="70%" valign="top" align="left">20190114081137_hedgehog-banner-2.jpg</td></tr></table>
            [from_name] => Thomas & George Martin Violin Makers
            [from_email] => getintouch@thomasmartin.co.uk
            [reply_name] => 
            [reply_email] => getintouch@thomasmartin.co.uk
            [result] => the Mail sent successfully.
            [var] => 1
        )
healyhatman 14 Jan, 2019
{var:upload#.[n].path} in the attached files box. Replace # with the correct number
spytech 15 Jan, 2019
Hi, did you mean add this to the 'Attachments list' box in the Email action? If so I did that but it did not work, see details below:

Array
(
[chronoform] => instrument-submission-bob
[event] => submit
[title] => Mr
[first_name] => Paul
[last_name] => ABc
[email_address] => *******
[telephone_number] => wwe
[enquiry_type] => Valuation
[enquiry_type_other] =>
[instrument_details] => sdsd sd sd sd
[button14] =>
[cd1da2a6f01a38c43731b5371c1bb403] => e15ef42b5b6e11c8a371552f8659f748
[77db7af04126bf61bc610a36149e026b] => ca7a297bcd23d035e9af1d1ed23f055a
[nrid] => d303dce88666166c
[Itemid] => 214
[option] => com_content
[view] => article
[id] => 74
[file99] => Array
(
[0] => 20190115073751_settings-512.png
[1] => 20190115073751_common-frog-badge-2.png
[2] => 20190115073751_mics.jpg
)

[instrument-submission-bob] =>
)

Array
(
[upload3] => Array
(
[path] => /******/components/com_chronoforms6/chronoforms/uploads/
[file99] => Array
(
[extensions] => Array
(
[0] => png
[1] => jpg
[2] => jpeg
[3] => gif
)

[saved] => 0
)

[file99[0]] => Array
(
[extensions] => Array
(
[0] => jpg
[1] => jpeg
[2] => png
[3] => gif
[4] => pdf
[5] => doc
[6] => docx
[7] => txt
[8] => zip
)

[info] => File is not present.
)

[var] =>
)

[email4] => Array
(
[recipients] => Array
(
[0] => *******
[1] => getintouch@thomasmartin.co.uk
)

[subject] => Sell your Bass Submission
[body] => Dear T&G Martin,

You have received a website submission for Selling a Bass from: Mr Paul Spyker
<br />
Here are the lists of photos submitted - Thanks:<br /><br />


Regards
Your Website
<table width="100%" cellpadding="5" cellspacing="3" border="0" class="ui table"><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Mr</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Paul</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Spyker</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">paul@spytech.co.uk</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">wwe</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Valuation</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left"></td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">sdsd sd sd sd</td></tr><tr><td width="30%" valign="top" align="right"><strong>Upload Your Photo</strong></td><td width="70%" valign="top" align="left">20190115073751_settings-512.png</td></tr></table>
[from_name] => Thomas & George Martin Violin Makers
[from_email] => getintouch@thomasmartin.co.uk
[reply_name] =>
[reply_email] => getintouch@thomasmartin.co.uk
[result] => the Mail sent successfully.
[var] => 1
)

)
healyhatman 15 Jan, 2019
Didn't work because your file upload action didn't work.
spytech 15 Jan, 2019
The files did upload to the server, it's just that they did not attach to the email. Any elaboration on 'file upload action didn't work'?
healyhatman 15 Jan, 2019
According to the debug you last posted, no files were uploaded
spytech 15 Jan, 2019
Sorry, my mistake. They did upload prior to adding the additional code you sent me. Once I added the code it was then no longer uploaded.Should the code you suggested be added to the email action under 'Attachments List', if so then this does not work and prevents both the files being uploaded and did not solve the issue of having the files attached to the email.
healyhatman 15 Jan, 2019
It should be added to attachments list as {var: upload3.[n].path}

Don't copy paste from forums always type manually
spytech 15 Jan, 2019
Okay, I typed in the text you provided, the files have uploaded to the server but the issue is still that they do not attach to the email, see debug below:


Array
(
    [chronoform] => instrument-submission-bob
    [event] => submit
    [title] => Mr
    [first_name] => dfd
    [last_name] => fdf
    [email_address] => *****
    [telephone_number] => fgfg
    [enquiry_type] => Valuation
    [enquiry_type_other] => 
    [instrument_details] => fggg fgfg
    [button14] => 
    [cd1da2a6f01a38c43731b5371c1bb403] => 551039e07341bbf9e96d97b0082468c8
    [77db7af04126bf61bc610a36149e026b] => ca7a297bcd23d035e9af1d1ed23f055a
    [nrid] => d303dce88666166c
    [Itemid] => 214
    [option] => com_content
    [view] => article
    [id] => 74
    [file99] => Array
        (
            [0] => 20190115085300_common-frog-badge-2.png
            [1] => 20190115085300_earthwatch-logo.png
        )

    [instrument-submission-bob] => 
)
Array
(
    [upload3] => Array
        (
            [path] => /*****/components/com_chronoforms6/chronoforms/uploads/
            [file99] => Array
                (
                    [extensions] => Array
                        (
                            [0] => png
                            [1] => jpg
                            [2] => jpeg
                            [3] => gif
                        )

                    [saved] => 0
                )

            [file99[0]] => Array
                (
                    [extensions] => Array
                        (
                            [0] => jpg
                            [1] => jpeg
                            [2] => png
                            [3] => gif
                            [4] => pdf
                            [5] => doc
                            [6] => docx
                            [7] => txt
                            [8] => zip
                        )

                    [info] => File is not present.
                )

            [var] => 
        )

    [email4] => Array
        (
            [recipients] => Array
                (
                    [0] => ******
                    [1] => getintouch@thomasmartin.co.uk
                )

            [subject] => Sell your Bass Submission
            [body] => Dear T&G Martin,

You have received a website submission for Selling a Bass from: Mr dfd fdf
<br />
Here are the lists of photos submitted - Thanks:<br /><br />


Regards
Your Website
<table width="100%" cellpadding="5" cellspacing="3" border="0" class="ui table"><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Mr</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">dfd</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">fdf</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">paul@spytech.co.uk</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">fgfg</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Valuation</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left"></td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">fggg fgfg</td></tr><tr><td width="30%" valign="top" align="right"><strong>Upload Your Photo</strong></td><td width="70%" valign="top" align="left">20190115085300_common-frog-badge-2.png</td></tr></table>
            [from_name] => Thomas & George Martin Violin Makers
            [from_email] => getintouch@thomasmartin.co.uk
            [reply_name] => 
            [reply_email] => getintouch@thomasmartin.co.uk
            [result] => the Mail sent successfully.
            [var] => 1
        )

)
healyhatman 15 Jan, 2019
Again your debug you've provided shows the files as not uploading.
[info] => File is not present.
healyhatman 15 Jan, 2019
Send a screenshot of your file upload action. Also make sure it's BEFORE the email action.
healyhatman 15 Jan, 2019
Got anything in the "failed" event for the file upload? Could you put a message in there to be displayed if your upload fails, because based on the debug you've sent your files are NOT being uploaded.
spytech 16 Jan, 2019
Hi, any news on this, would love to get this working as soon as possible.

Cheers
healyhatman 16 Jan, 2019
Sure is! I wrote a reply for you above. Please read.
spytech 16 Jan, 2019
Sorry, missed it, did't realise we got to page 2🙂
Where do I add this, as there is no specific field called just 'failed' in the upload action, just ''Max size exceeded error','Min size limit error','File extension error'. These fields all have text in them.
healyhatman 16 Jan, 2019
There should be a success event and a giant red failed event you can put other actions in.
spytech 16 Jan, 2019
Hi, I added it and it showed the failed message. I did however upload the files as they are iin the location under uploads for this morning. Error below:

This failed[h3]
Dear Paul Spyker, thank you for submitting your intrument(s). We’ll be in touch soon.
[/h3]
Array
(
    [chronoform] => instrument-submission-bob
    [event] => submit
    [title] => Mr
    [first_name] => Paul
    [last_name] => Spyker
    [email_address] => ***k
    [telephone_number] => 67890
    [enquiry_type] => Valuation
    [enquiry_type_other] => 
    [instrument_details] => SFDFD
    [button14] => 
    [_ga] => GA1.3.1370353196.1532495600
    [nrid] => 114480c7c1e3481b
    [cd1da2a6f01a38c43731b5371c1bb403] => 4b5e0bbe107097ebc747c6e56ab5dd80
    [77db7af04126bf61bc610a36149e026b] => 1be800810aeda680f7b5c8c397549618
    [_gid] => GA1.3.244743626.1547624721
    [_gat_gtag_UA_4586418_1] => 1
    [Itemid] => 214
    [option] => com_content
    [view] => article
    [id] => 74
    [file99] => Array
        (
            [0] => 20190116080820_common-frog-badge-2.png
            [1] => 20190116080820_badge-hedgehog.png
        )

    [instrument-submission-bob] => 
)
Array
(
    [upload3] => Array
        (
            [path] => /******o/components/com_chronoforms6/chronoforms/uploads/
            [file99] => Array
                (
                    [extensions] => Array
                        (
                            [0] => png
                            [1] => jpg
                            [2] => jpeg
                            [3] => gif
                        )

                    [saved] => 0
                )

            [file99[0]] => Array
                (
                    [extensions] => Array
                        (
                            [0] => jpg
                            [1] => jpeg
                            [2] => png
                            [3] => gif
                            [4] => pdf
                            [5] => doc
                            [6] => docx
                            [7] => txt
                            [8] => zip
                        )

                    [info] => File is not present.
                )

            [var] => 
        )

    [email4] => Array
        (
            [recipients] => Array
                (
                    [0] => *****
                    [1] => getintouch@thomasmartin.co.uk
                )

            [subject] => Sell your Bass Submission
            [body] => Dear T&G Martin,

You have received a website submission for Selling a Bass from: Mr Paul Spyker
<br />
Here are the lists of photos submitted - Thanks:<br /><br />


Regards
Your Website
<table width="100%" cellpadding="5" cellspacing="3" border="0" class="ui table"><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Mr</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Paul</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Spyker</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">paul@spytech.co.uk</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">67890</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">Valuation</td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left"></td></tr><tr><td width="30%" valign="top" align="right"><strong></strong></td><td width="70%" valign="top" align="left">SFDFD</td></tr><tr><td width="30%" valign="top" align="right"><strong>Upload Your Photo</strong></td><td width="70%" valign="top" align="left">20190116080820_common-frog-badge-2.png</td></tr></table>
            [from_name] => Thomas & George Martin Violin Makers
            [from_email] => getintouch@thomasmartin.co.uk
            [reply_name] => 
            [reply_email] => getintouch@thomasmartin.co.uk
            [result] => the Mail sent successfully.
            [var] => 1
        )

)
healyhatman 16 Jan, 2019
well if there's an error then no they didn't upload properly. You'll just have to upload a backup form for us to look at, or pay me to fix it for you, or send an email to the developer using the contact button up top.
spytech 16 Jan, 2019
Okay, the files did upload correctly as I can download them and open them. I can upload the form that is not a problem. See attached.
​[file=11406]Instrument_Submission_Bob_16_Jan_2019_09_19_44.cf6bak[/file]
spytech 16 Jan, 2019
Out of interrest what are your rates?
healyhatman 16 Jan, 2019
Per job depending on complexity
healyhatman 16 Jan, 2019
Also I can't look at that backup right now my internet is down. Typing this on mobile.
spytech 16 Jan, 2019
Okay, let me know if something obvious if not let me know what it will cost to make this work, seems like it should be something taht just works but hey.
healyhatman 16 Jan, 2019
Sorry my bad it should be (again type don't copypaste)
{var:upload3.file99.[n].path}
This topic is locked and no more replies can be posted.