Oct 27, 2017 11:41 AM
I am very familiar with creating landing pages, CTA's, etc. I need help creating a download for product sheets for people to download and e-books that people will download. Ideally I'd like to use the e-book as a carrot to gram contact information and setup a workflow to this with marketing drip campaign.
please advise as how to setup the download bit.
Solved! Go to Solution.
Nov 1, 2017 8:23 AM
Hi Jeff,
I think i have found a solution to your problem -
Follow the below steps -
Next, set the redirect URL on the landing page:
Hope this Helps!
Ciaran
Jul 12, 2021
1:01 PM
- last edited on
Jul 13, 2021
5:41 AM
by
TiphaineCuisset
I have read the overall replies very attentively. the overall ideas are very helpful and valuable. I had also the same question but I have got ideas from here. thanks to all.
Feb 10, 2021 11:42 AM
While I love a good workaround, it would be great to get Hubspot's attention on this. With the pop-up form, it's so easy to simply have a download link on the thank you page. Why isn't this also possible with a normal form? Not even when using the "template" for eBook/file download. Seems like a development oversight.
Jan 30, 2021 6:14 AM - edited Jan 30, 2021 6:16 AM
The lone change is in the install code, so you could utilize a similar structure, changing just the url for each record in the implant code. Could be valuable to make a shrouded field to particular which digital book was downloaded.
Jan 20, 2021 5:47 AM - edited Jan 20, 2021 5:48 AM
Hi @mayormario ,
I tried this on my page with an image file but the image isn't downloading after I submit the form.
Here's my code:
<script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2.js"></script>
<script>
var data = [];
hbspt.forms.create({
portalId: "464503",
formId: "6d6c2302-d30b-482f-bcd5-18d4b14b44e0",
onFormSubmit: function($form) {
var a = document.createElement("a");
a.href = "https://f.hubspotusercontent00.net/hubfs/464503/RN-MEMBER-Benefit_Badges-011821_V1.png";
a.download = "RN-MEMBER-Benefit_Badges-011821_V1.png";
a.target = "_blank",
a.click();
}
});
</script>
What am I doing wrong?
Jan 20, 2021 7:28 AM
Hi:
There's an error in my code. This line:
a.target = "_blank",
must be:
a.target = "_blank";
Oct 2, 2020 12:18 PM - edited Oct 2, 2020 12:21 PM
,
Nov 1, 2017 8:23 AM
Hi Jeff,
I think i have found a solution to your problem -
Follow the below steps -
Next, set the redirect URL on the landing page:
Hope this Helps!
Ciaran
Nov 13, 2021 2:36 AM
Thank you!
Related question, how can get my file (PDF ebook) hosted on https://cdn2.hubspot.net it is showing up on (https://fs.hubspotusercontent00.net) and I found that https://cdn2.hubspot.net has a far better domain health rating?
Thank you,
Craig
Jun 14, 2021 3:56 AM
Hi,
In your solution there might be cases where user puts in random email but he will be re-directed to the file page anyway.
I would like the user to put in correct email then only we will send the file to their mail.
I tried to create new form and use follow up tab (this should be the email sent after user clicks download?).
But somehow I don't get any email (the email on follow up tab not sent).
Jun 14, 2021 8:31 AM
Sep 14, 2018 9:38 AM
In this solution, the visitor can't be redirected to a thank you page or anywhere else after the asset has been downloaded. Is that correct? If so, how do I achieve that?
Apr 9, 2020 12:00 PM
This is a Javascript solution. In the form settings, redirect to a thank you page or show a Thank you message, then in the embed code insert the code marked in red. Remember to add a colon after formId: "xxx-xxx-xxx".
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
hbspt.forms.create({
portalId: "xxxxx",
formId: "xxx-xxx-xxx",
onFormSubmit: function($form) {
var a = document.createElement("a");
a.href = "http://example.com/file.pdf";
a.download = "file.pdf";
a.target = "_blank",
a.click();
}
});
</script>
May 21, 2020 11:58 AM
So, i would need to create one form for each e-book, right?
May 21, 2020 12:16 PM
The only change is in the embed code, so you could use the same form, changing only the url for each file in the embed code. Could be useful to create a hidden field to distinct which ebook was downloaded.
May 29, 2020 5:00 PM
great! it worked!