Can I generate a PDF from a form submission?

Created by Phil Kurth, Modified on Tue, 28 Jun, 2022 at 12:48 PM by Phil Kurth

PDF generation is not a built-in feature of the plugin at this stage.


However, you may write your own code to hook into the form submission, generate a PDF, and attach the PDF to the form using the af/form/email/attachments filter. The basic process will be as follows:

  1. Generate a PDF via PHP with field values retrieved using af_get_field().
  2. Save the PDF to a file on the server.
  3. Return the file path from the filter to attach it to the email.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article