Thank you page with a link that downloads my PDF file

  • Profile Image
    Asked on June 01, 2016 at 10:42 AM

    I have a form in a LightBox. I want it set up so that when someone fills out the form and clicks submit, it will take them to a thank you page, but that thank you page also downloads a PDF. I don't want it as a download link though. I have tried using


    <!-- <meta http-equiv="refresh" content="3;'','_blank');"> -->

    so that it opens it in a new tab, but every time I save the html, it strips it. Is there a workaround to make this happen? I was thinking about using an onLoad but I believe it would also strip that.


  • Profile Image
    Answered on June 01, 2016 at 11:50 AM

    Yes, any inline javascript codes will be stripped off for security reasons. You can't also embed any scripts on the Text HTML field. They will be removed. These are just common methods to execute XSS or any malicious codes into the form builder which expose our system into risk.

    The only workaround is to apply your custom codes into your form source code.

    However, if you only want to display a PDF in your form, you can use these widgets.

    If you need further assistance, let us know.

  • Profile Image
    Answered on June 01, 2016 at 12:17 PM

    The source code still doesn't let me change anything on the thank you page, it is for the form itself.

  • Profile Image
    Answered on June 01, 2016 at 12:25 PM

    You have to download your form source code and edit/insert any codes on the HTML file. The downloaded file contains the HTML file of your form, the css and js files. You have to edit the HTML file if you want to make any changes on your form.

    You can't make any changes on the source code box shown in the publish wizard. It is only meant for copying, not editing.

    If you mean on the thank you page, unfortunately, it works the same way on the form builder. You can't use hyperlink codes with javascript or any scripts on the thank you page editor or within the source code box. It will be stripped off.

  • Profile Image
    Answered on June 01, 2016 at 12:28 PM

    I just realized that you are referring to your form's thank you page. I would suggest

    Since our form thank you page does not allow your code (because as I've said, it contains javascript code) I would suggest to create a custom thank you page instead and embed your hyperlink code there. Then set your custom thank you page as your form's thank you URL. Here's how:

  • Profile Image
    Daniel Lewis 
    Answered on July 25, 2016 at 03:11 PM

    I'm also trying to automatically download a pdf when the user's redirected to a custom thank you page after filling out a JotForm. Doing this right now with a document.ready function that sets a timeout that calls The issue though is that Chrome blocks the download as a popup. Any idea how to do this without the download being blocked?


  • Profile Image
    Answered on July 25, 2016 at 05:15 PM


    Your question is moved to a separate thread and shall be addressed there shortly.

    Thank you!