How to use "file download" in CF5

mapk 18 Jan, 2017
Hi,

I am trying to create a simple form with 2 fields "name" "email",
the user must compile this form to download a file (it is always the same file)

I see there is an element "file download" under utilities section. I wrote there the physical path to my file on the server but when i submit nothing happens, the "display message" doesn't appear and the form is still there.

I tried the guide at this link : http://www.chronoengine.com/faqs/57-cfv4/cfv4-actions/2757-how-do-i-use-the-file-downloader-action.html

But it is for CF4 and i can't understand what to do.

Thanks for any help.

Marco
GreyHead 18 Jan, 2017
Hi Marco,

If nothing is happening then the form probably isn't submitting. Does it work if you use the View Form or Test Form links from the Forms Manager?

Bob
mapk 19 Jan, 2017
Hi Bob,

yes trying with "Test form" i can download the file but the "display message" doesn't appear.
Including the form with the CF module on an article page it does nothing...

Any suggestion? Could you provide a guide on how to use the download file element

Thanks
Marco
GreyHead 19 Jan, 2017
Hi Marco,

If the form is working with the View Form link then the problem is most likely that it is not submitting from the module. Please see this FAQ

Bob
mapk 19 Jan, 2017
Thanks, now it sumbits and the file is downloaded... just the display message doesn't appear in place of the form.

Can it be solved? or i will eventually play around with jquery.

Thanks again.
Marco
GreyHead 19 Jan, 2017
HI Marco,

I think that the problem is that if you use a direct form download then ChronoForms loses control of the process at that point so can't display a message. You could add a Joomla! System Message before the file download that will be shown on the next page load; or you could remove the download action and add a download link to the Thank You message to get both.

Bob
amine 19 Jun, 2017
Hi,
I'm trying to download a file for the chronochonnectivity list of file.
I succeeded to upload the files and the probleme is when i try to download a file
I created a download event and in the path i putted the path where the files are uploaded but i cant downloawd them
PS: when i put the file name in the end of th epath i can download it but it's static and i dont want this kind of download(just 1 file)
i the data base i have the file name saved and the files are saved in the server floders
i need help please
Thank you
Please see this screenshots blow to understand more my problem

Best regards
Max_admin 19 Jun, 2017
Hi Amine,

What about trying v6 instead ? it's more flexible and better for the long term.

You can call the file field value in v5 using {file1}, but you need to setup a db read action in your form.

But in v6 you can setup everything in the connection itself, no need to use Chronoforms for the download part.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
amine 19 Jun, 2017
Thank's for your quick reply,
V6 look more complicated to me, I worked with v5 and I'm about to finish the work so I think that I have to find the solution with the V5.
I did what you told me to do, but it didn't work.
Please see the screenshot below and tell me if I did something wrong.
(Is it in relation to the uploaded file do I have to put {file1} in the path of the uploaded file too ?)

Best regards
Max_admin 20 Jun, 2017
Hi Amine,

The upload file path should not be affected.

Did you add a "db read" action before the download action ? what settings do you have in the db read action ? what is the url in the browser when you are on the download page ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
amine 20 Jun, 2017
Good day,
Sorry i thought that i attached the screen shots.
Here what i did in the screen shot below
Max_admin 20 Jun, 2017
Hi Amine,

Please drag a debugger inside the "found" event of the db read and remove the "download" action in order to test the data retrieved by the db read.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
amine 21 Jun, 2017
Hi Max,
The data rerieve by the db read work fine

Best Regards
amine 22 Jun, 2017
Hi ,
I'm trying with the V6 as you suggest to me but I still have an issues with the download part
In the v6 the path look more complicated
How can I find the path and what is the parameter or the missing thing to add so I can download a specific file from my list
please see the screen shots below
Max_admin 23 Jun, 2017
Hi Amine,

In v6 the path depends on where the files are stored, and you also need to call the file name variable, this depends on where and how you call the download function, please post a screenshot of the "download" event.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
amine 27 Jun, 2017
Hi max,
You will find below the screenshots of the download event and the path that I use + the variable name

Best regards
Max_admin 28 Jun, 2017
Hi Amine,

You will need a slash after "uploads" (uploads\), and what is the "select type" in the "read data" ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
amine 28 Jun, 2017
HI Max,
The select type : All matching records
I changed it to : see the screen shot below
And it still dose not work

Best regards
Max_admin 29 Jun, 2017
Hi Amine,

You will need to select the "First matching record" option.

Then your var shortcode should be: {var:read_db.form.file1}

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
amine 03 Jul, 2017
Hi Max,
I did all what you told me to do and still have the same problem
When I choose First matching record option nothing happens
Do you have any ideas why or where is the problem?

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