How to let user download a file upon the form submission

  • realestatecoach
    Asked on October 19, 2015 at 2:47 PM
    Lastly,  in this example the end of the form shown allows for a person to download a report.  Is this possible to do as well? The last page is a download free report but it is the submit button at the moment.  
  • victor
    Replied on October 19, 2015 at 4:14 PM

    Hi,

    Could you please elaborate a bit more on what type of report you would like to add. I just reviewed your email notification and the thank you page, but did not find any report.

    I am assuming that you would like to create a link in which the user can download a PDF or something similar with all the data they have entered.

    If this is the case. This will not be possible since the data was not completely submitted.

    Please let me know if I am not correct.

    Regards

  • realestatecoach
    Replied on October 19, 2015 at 4:19 PM

    Hi Victor

    Yes I have a pdf seller report that I would like to make available for downloading.  It helps home sellers pre-pare their home for sale.   

    So yes you are correct a link that could be downloadable pdf.   I have the report, but I was not sure if there is a way to upload that report on my website or how exactly to do something like that.   I don't have the form on my website now, as I wanted to just build this one and make sure it was ready when I do put it on my website.

    Thank you

  • victor
    Replied on October 19, 2015 at 5:40 PM

    Hi,

    I am assuming this is an external PDF that you would like the users to download. If you have a dropbox or google account, you can upload the PDF and get the URL of the file.

    Once you have the URL, you may use the HTML TEXT field to create the link so your users may download the PDF.

    How to let user download a file upon the form submission Image 1 Screenshot 30

    You may use the small change icon  to create the link.

    How to let user download a file upon the form submission Image 2 Screenshot 41

    Please let us know if this helps.

    Regards

  • realestatecoach
    Replied on October 19, 2015 at 6:15 PM

    Okay very cool.  To make sure I understand this though, they would click on the text hyperlink to then download the PDF?  or When they click on the submit button would it auto-download using the link I provided?

  • Aytekin JotForm Founder
    Replied on October 20, 2015 at 2:06 AM

    Both options are possible. If you link to the PDF file directly, they will download it automatically. If you show the link on the thank you page, then the user will click on the link. 

  • realestatecoach
    Replied on October 20, 2015 at 8:45 AM
    The question then I have is how do I link directly to button?
    ...
  • victor
    Replied on October 20, 2015 at 10:22 AM

    Hi,

    You can not place a direct link in the submit so the user will download the PDF file. But there are a couple of work around that you can do.

    1) You can create a custom button using the HTML TEXT field

    How to let user download a file upon the form submission Image 1 Screenshot 30

    Press the "<>" to view the source code and enter the following HTML code

    <form action="{URL of pdf file}" method="get">

    <button type="submit">Download!</button>

    </form>.How to let user download a file upon the form submission Image 2 Screenshot 41

    You just need to place the correct URL of where the PDF is located.

     

    2) Modify the Thank You Page URL. As you can see a previous thread from my colleague, http://www.jotform.com/answers/502457, he modified the Thank you Page so it would direct to a small PHP file where the file is located and would download automatically.

    If you require further assistance, please let us know and we will be glad to assist.

    Regards

  • realestatecoach
    Replied on October 20, 2015 at 12:45 PM
    Sweet. Is there any tips or tricks to change size and color? Like medium
    size and blue or ocean or sky blue etc?
    Does html work here for button size and colors?
    ...
  • David JotForm Support
    Replied on October 20, 2015 at 2:20 PM

    Inline CSS with work, for example:

    <form action="{URL of pdf file}" method="get"><button style="background-color: deepskyblue; text-decoration: underline; color: white; height: 50px; width: 100px;" type="submit">Download!</button></form>

    Will give you a button similar to what you are looking for.  Here is what that button would look like:

    https://form.jotform.com/52925578420965

  • realestatecoach
    Replied on October 20, 2015 at 6:44 PM

    Okay.  I think I just about have this one ready to rock.  I followed all the steps and made some tweaks.  Added the URL for the downloadable form.  but the download didn't seem to go when I used the preview to test it in designer.  

    Here is the link http://www.jotform.com//?formID=52915161847157#design

    Did I miss a step?

  • Chriistian Jotform Support
    Replied on October 21, 2015 at 1:43 AM

    Hi,

     

    You can fully test the functionality of your form by using the direct link of the form (i.e http://www.jotform.us/form/52915161847157). I noticed that you have uploaded your PDF file in your Google Drive and use the link as the URL of the PDF file. You might as well set the Thank You page URL to your PDF file so the user will be redirected to the file when they click submit. 

    How to let user download a file upon the form submission Image 1 Screenshot 20

     

    You can check this sample clone form that  I have created - https://form.jotformpro.com/52931519000951.

    Do let us know if you need further assistance.
    Regards.

  • realestatecoach
    Replied on October 21, 2015 at 1:50 PM

    Thank you very much all of you!   So I couldn't get the html code for the download button to respond for some reason.  I left that in the form for now as the "Download My Free Guide!"  

    Using the method 2 as some of you suggested, does work and the PDF report downloads like a charm very well.  

    The last question I have, now that this is up and running...

     

    Is there any way to use the "Redirect" URL to open in a new window?

    Had the button/ submit worked to download the form using the HTML I believe Target= "blank" somewhere in there works.  But since that didn't work, is there a way to do something similar in the Thank You Page redirect?   

     

     

    Thanks for all the help, this form looks amazing because of you guys! 

  • Carina
    Replied on October 21, 2015 at 3:35 PM

    Thank you for your feedback. It's good to know that we have been able to help.

    Please try cloning this form:

    https://form.jotform.com/52936383102958? 

    From my tests the download button is working well.

    Let us know if we can assist you further.   

  • realestatecoach
    Replied on October 21, 2015 at 5:45 PM
    Thank you. This may duplicate. How can it be opened in a new window using
    the download button or the thank you page redirect?
    ...
  • victor
    Replied on October 21, 2015 at 7:05 PM

    Unfortunately, we do not allow javascript code in the HTML text field for security. I am assuming you would like to redirect to another page when they click submit. You can modify the URL of the Thank You page by

    1) press the THANK YOU  button on the top toolbar

    How to let user download a file upon the form submission Image 1 Screenshot 40

    2) In the thank you page, you will notice 2 buttons at the bottom. Press the REDIRECT TO A PAGE

    How to let user download a file upon the form submission Image 2 Screenshot 51

    3) You may change the URL to the page you would like the users to be redirected

    How to let user download a file upon the form submission Image 3 Screenshot 62

    Please let us know if this helps.

    Regards

  • realestatecoach
    Replied on October 21, 2015 at 7:09 PM

    That is actually what is set up now for the form.  But since the form is in a website, the form then replaces the website with the url link.  Is there a way in this set up to have it open up in a new window as right now the redirect appears to be opening on the same window?

     

    This method that was suggested does not seem to work on my forms:

     

    Inline CSS with work, for example:

    <form action="{URL of pdf file}" method="get"><button style="background-color: deepskyblue; text-decoration: underline; color: white; height: 50px; width: 100px;" type="submit">Download!</button></form>

    Will give you a button similar to what you are looking for.  Here is what that button would look like:

    https://form.jotform.com/52925578420965

  • Chriistian Jotform Support
    Replied on October 21, 2015 at 11:28 PM

    Hi,

     

    Unfortunately, the custom URL in the Thank You page does not have an option to redirect to a separate window/tab. I would suggest that you create your own Thank You page hosted in your site. On that Thank You page, you will then add the code to redirect to the file that will open in New tab. You can check this guide: Create a Custom Thank you page with Auto redirect. On your custom Thank You page, you can use this Javascript code:

    <script type="text/javascript">

    var timer = 3; //seconds

     website = "https://drive.google.com/file/d/0BwSiBgRA06gAdFV3N3REaUdDcTQ/view?usp=sharing";

    function delayer() {

     window.open(website, '_blank');

    }

    setTimeout('delayer()', 1000 * timer); 

    </script>

     

    You can check this thread that was previously mentioned by my colleague, http://www.jotform.com/answers/502457 for more information on the setup.

     

    Do let us know if you need further assistance.
    Regards.

  • realestatecoach
    Replied on October 22, 2015 at 6:45 PM
    Thank you for this option. I have to check with the webmaster for my
    microsite to see if I could create a custom thank you page like you show.
    I'm not sure if it can be done on my site or not. Definitely a great
    option.
    Currently there is no way in css or java to tell the current thank you page
    to open in new window or redirect though?
    Okay. That's cool, not a huge deal they can always just go back with the
    left arrow on the browser
    Thanks again for all your help
    ...
  • realestatecoach
    Replied on October 22, 2015 at 8:33 PM

    Alright.  I finally got all this to work.  Would you mind checking or testing to see if you would change anything with the timer?

     

    http://www.brettbolzenthal.com/remaxnc/index.asp?p=text&id=14450

  • Sammy
    Replied on October 23, 2015 at 4:50 AM

    At the moment we do not have the option to open the thank you page in a new tab/window.

    I did check an test the redirect solution you implemented, the waiting time is sufficient, perhaps you could also provide a message letting the user know that a new window will open allowing them to download the PDF.

    This is because some browsers might have popup blockers and the window/tab wont open immediately when triggered from JavaScript so the user might wonder where is the report.