[Forminator] On form submit download a pdf or any file

0

It’s more a question for a feature than it’s an issue. Can I create a form with forminator that after submit it downloads a pdf form?

That is to include a separate pdf file in the form which is downloadable after a user fills the form and on submitting, it downloads the pdf file.

Is that possible with forminator? If not please add this as a feature request.

  • Mukul Chawla
    • Product Manager

    Hi Brian Haas

    There is no direct method to do this. However, you can use the following workaround for this:

    1. First of all, you need to upload the pdf you want your members to download to the media library. Once your pdf file is uploaded, you’ll see the “Copy Link” on the right side which shows the link to that pdf file. We’ll need this link in the next step.

    2. Set the “After submission” behavior of your form to the Inline Message and add the thank you text that you need to show to the member after form submission. Along with the thank you text, you can add a “Download PDF” link or call it whatever makes sense in your case. Now, you need to enter the URL of the pdf file taken from step 1 as the link URL here.

    3. Once you have added a link into the Inline Message and used the file link url, switch to the “text” editor mode in the inline message editor. You need to add a “download” attribute to the anchor tag of the link as shown below:

    <a href="your_file_url.pdf" download>Download PDF</a>

    This step is to make sure the file is downloaded on clicking on the download link instead of opening the pdf file in the browser.

    4. Make sure the “Auto-close success message” option is unchecked for the inline message to make sure the success message and the download pdf link always remain visible.

    Attached is a short video of the whole process: https://www.loom.com/share/91f899a81bac47b299d0b2eb8a2d76ff

    Note that the pdf file link will not be available in the page source before a user has successfully submitted the form. So your PDF file should be safe and the only way to get access to the download link or the pdf file link is after submitting the form successfully.

    That being said, I understand that this could be a tedious process and I’ll add a feature request for the Forminator to make this process easier and doable from the plugin.

    Hope this was helpful. Let us know if you’d need any further assistance with this.

    Regards,

    Mukul Chawla

    • XOGUM
      • Flash Drive

      We just applied everything you said and works like a breeze out of the box!!
      Also added Hubspot integration, quite smooth, to our Blog page https://xogum.app/adobe-flash-player-chrome-removal/ and people can download Steve Jobs letter. :heart_eyes:

      We have been analysing Forminator “unmistakable wisdom” and multi-task capabilities and we found out that:

      1- Forminator cannot do Guacamole, not at least the way we cook!
      2- Forminator cannot do sex with the Angels, but it is becoming a God on his own right :hugging:
      3- Forminator saves you a lot of money and makes you money but still doesn’t print Dollar notes.
      4- Forminator flexibility like a ballerina is truly remarkable but cannot go to the Olympics.
      5- Forminator doesn’t smoke :smoking: but has some hot smoking ideas of his own.

      Amazing, guys!

      +5 Points for you, Mukul Chawla

    • Superhero 839
      • Deleted User

      apologies if this is a dumb question, but how do we get the URL for the pdf before it has been generated (i.e., before the user has completed the form)? It sounds like you are suggesting we upload a pdf? But we want the user to fill out a form and the pdf will be generated from the form.

      We are able to have the pdf version of the completed form get emailed as an attachment in the email notifications. But we want to make it available for the user to download immediately after they finish completing the form and hit the submit button.