I created a form to download pdf. files.
I`m with dificult to insert with a file or directory path correcty.
Could you tell me how can I insert with semathic correctly:
I`m using this code:
{path:root/apresentacao-corporativa.pdf}
Please find in attachement the printscreen.
Regards,[file=11837]print-CF.jpg[/file]
Hi,
The following will do what you need I think:
{path:root}/apresentacao-corporativa.pdf
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks! It is working now!
The download file action interrupts execution. Not a Chronoforms thing, it's a way-the-internet-works thing.
If you want to download a file after submitting your form, you'll need to put the download action in another event and have a button or link pointing to that event displayed after submitting your form. You can also use a javascript block with DOM ready ticked and the code window.location('{url:download_event}&file={var:blahblah}'); to have the file download automatically once your form submission success page loads. In this case {var:blahblah} would be some sort of code or identifier that you retrieve in the download event using {data:blahblah} to determine which file you will download.
Thanks for the information. Could yout tell me the steps to do it?
My Knowledge in javascript is low.
Thanks!
that JavaScript I gave you is literally the whole thing.
User Submits form
Use a switch or PHP in the submit event to return a code you will use to select the file you want, like a number
Display success page
+ Put JavaScript I gave you on success page
+ Put link on page to {url:download}&file={var:code}
In the download event, use {data: code} to pick which file to download
Use download event to download that file
My Applogies, but I didn`t understand well those steps.
I was testing and didn`t work.
Could you specify the steps with more information ?
Regards,
Well first tell me how you decide which file to give to the user?
Ok. This is the form that I have to user click to download.
http://leadershipbt.com/portal-lbc/pt/down/144-download
When you click to download the file .pdf is saved in your computer.
If is easier to you understand my configuration I can send you a message private with a user to login as administrator.
OK so it's the same file every time?
Create a new event in the Setup tab called "download". Put the download file action in that event.
When your submit event is complete DO NOT use the download file action. Instead, display a link to {url/full:download}
Also use the javascript I gave you, ignoring the part about a download code.
The file pdf is the same for all option.
The problem is when I click to download stay in looping.
If the file is the same then get a link to the file and place it in a "Custom code" event in the submit event, does that help ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Yes like I told you what the problem is, what the reason is, and gave you a solution WITH CODE. Have you tried it?