download a pdf file directly

smart

Member
I have created an element with the download icon on the form & list.
And then created a custom link pointing to the pdf uploaded to server.
When click on the icon, pdf is viewable in a new window or in the same window.
Instead, I want that pdf download it directly. I know I can add "a" html code here.
Is there any best solution?
Thanks
 
Thanks Troester. I appreciate your help.
I have studied <a> tag. But I am not able to add <a> in the Custom link in the element list setting. If <a> is added in the custom link, some text appear with the icon (attached pictures).
I am finding ways to run some html code when the custom link is pressed.
 
Sorry, my screenshot is not that clear. It is actually double quote ("). I found that the value of the Custom link entered will become the value of "href" element in the frontend browser.
Below is the code pulled from the browser.
Code:
<a data-loadmethod="xhr" class="fabrik___rowlink  fabrik_view" data-list="list_28_com_fabrik_28" data-isajax="0" data-rowid="3" data-iscustom="1" href="/jm/<a href=?/jm/docs/live_scan.pdf? download> Download link </a>
">
0</a>

So I would assume I need to copy the template and find out how to include "download" keyword behind the href element.
 
Last edited:
Hi Cheesegrits,
Currently I am using Field element. Which element would be the suitable one?
Thanks
 
I was just wondering. The fileupload element already has a 'download link' option that solves this particular problem, forcing the browser to download the file rather than attempting to display it according to the MIME type.

-- hugh
 
Hi Cheesegrits,
Thanks for your reply. I'll take a look at the fileupload element.

Update: That's what I am looking for the "Download". I didn't pay attentions much. LOL.

Thanks you guys..
 
You are welcome.

Note that with the download link, you can also do other stuff like hit counts and logging, if you want to keep track of who downloads.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top