Custom Download Link in a Form in a CMS Template

I am trying to build a download page template. My client has a whole bunch of articles that users can download as PDF files. So, for every article, I am creating a download page, as a CMS template. Now, I want to map the custom download link that I have for my file to be associated with the lead-collection form, and after the form submits successfully, the correct article associated with the page is downloaded. It is like how we are able to download a PDF/E-book after we fill out a form on a website.

I am not sure how to do this in Webflow. Can you help?


Here is my public share link: https://saral-demo.webflow.io/downloads/deserunt

@mystic_yogi please provide a read-only link

@Rani_Sofya Please find my read-only link here: https://preview.webflow.com/preview/saral-demo?utm_medium=preview_link&utm_source=designer&utm_content=saral-demo&preview=7af0fc24e3732bfe61e80d40faa75ada&pageId=5f3b13c28e33aa70e1cdc5c5&itemId=5f3b1407f9f03d0483f21691&mode=preview

I’m trying to do the same. Is there a recommended solution for this?

Hi Celina,

There are a few ways, but pretty much all of them require some custom code.

The simplest one is to store the file in the CMS in a file field and then emit it into the page in a hidden download button. Your custom script would then pull that URL and set the form’s redirect URL. The end result is that when someone successfully submits the form, the browser will immediately download the file. No separate download page is needed.

I have a demo of that here-
Scroll down to the demo titled " Download CMS-stored file on form submit"

If you want a separate download page, you’ll need to use cookies or querystrings to track the file between the form submit and a centralized download page.

Also if you are trying to download PDFs and you want the browser to download them ( not just display them ), you’ll need to host them somewhere else and store the link in the CMS. Google Drive is pretty good for that.