Save the confirmation page as an PDF

We created a confirmation page with a bit of javascript where the javascript calculates a result from what the usre has filled out in the form. Underneath a screenshot of these results.

We want to save this confirmation page with this design as an PDF for the user to download. And if possible to send the pdf or link of the pdf to the user bij email.

Can anybody tell me if this is possible? And if it’s possible how to do this?

If the JavaScript runs on the confirmation page, I don’t think you can integrate with Gravity Forms in any way to create a PDF.

You can use Gravity PDF to create a PDF after the form is submitted, but that is before the confirmation is shown. I don’t know of a way in Gravity Forms to create a PDF of your custom confirmation that is created using JavaScript.

1 Like

Chris is right. You should be able to put your JavaScript into a GravityPDF custom template. There are a lot of cool things you can do with those.

Gravity PDF won’t process the JavaScript unfortunately, but you could always generate the chart server-side in a custom PDF template.

1 Like

Hi Jake,

Thank you for your reply, It’s a shame javascript wont process in Gravity form because I have the whole javascript code finish.

Do you mean by “but you could always generate the chart server-side” I have to rebuild it in PHP?

kind regards,

Robin

To clarify, JavaScript processes in Gravity Forms just fine. It however cannot be used in Gravity PDF documents.

Yes, building it in PHP is a possibility. I have also seen users generate the chart on the last page of the Gravity Form, then base encode it as an image (JPG, PNG, SVG), save it to a hidden Gravity Form field and display that image in the PDF.

2 Likes

Hi Robin,

In the past I have implemented some back-end PHP logic for saving and serving created PDF docs on the server, including special data handling (inserting files of HTML, field entries from multiple pages and forms, etc), for the construction of the generated PDFs. It should be no huge leap to also perform similar handling for custom images created on demand…

If you do decide to pursue a custom PHP solution, drop me DM, as I might have some (free) plug-in code that could make this approach even more tenable.

Cheers and good luck !

1 Like
© 2008 - 2021. Gravity Forms is a project by Rocketgenius Inc.