• Resolved cuxaf

    (@cuxaf)


    I’m trying to generate a pdf but not save the fields to the database.

    When using the function “remove_form_entry” with the “gform_after_submission” trigger, the submitted entry data is deleted after submission (like explained here: https://docs.gravityforms.com/delete-entry-data-after-submission/ )

    But of course gravitypdf can’t generate the pdf because the entries are already deleted…

    Is there a way to delete the entries after the pdf generation? Or a way to generate the pdf from the form without submitting it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jake Jackson

    (@blue-liquid-designs)

    You could use the Previewer plugin with the “Enable Download” option enabled to allow the user to download the PDF before the form is ever submitted. That will work in most cases, unless your form has upload fields that you’d like to access at a later date.

    Otherwise, the link you provided has good examples of plugins and code that will clean-up the entry once the submission process has completed. You’d need to ensure Gravity PDF is attaching PDFs to notifications so the PDF is generated and emailed automatically before the entry is deleted.

    Thread Starter cuxaf

    (@cuxaf)

    Thanks for the reply.

    We don’t send an a-mail to the user or the admin, we just want the user to download the pdf when submitting (and not save the fields to the database).

    Is there an Gravity PDF trigger like “gform_after_submission”, but then for when the pdf is generated, so we can use “remove_form_entry” after Gravity PDF is done?

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    It’s not possible to add a PDF download link to the confirmation page if the entry isn’t saved to the database. You could modify a PDF template and delete the entry after the data is extracted (although if the user never views the PDF the entry won’t be deleted), delete the entry data on a schedule (Entry Expiration would do the job), or use the Previewer add-on to allow the user to download the document before the form is ever submitted.

    If your against storing the form data in your database for any length of time the last option would be the best way to go.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Delete entry data after pdf generation’ is closed to new replies.