How To Generate PDFs with Gravity Forms

Travis  •    —   4 min read

Gravity Forms is great for collecting information directly from customers and potential leads directly on your WordPress site. What makes Gravity Forms super powerful is being able to take that submitted lead data and export it out in different forms.

With Fillable PDFs for Gravity Forms, you can take that lead data and populate it into an existing PDF document. This lets you create filled out applications or even signed contracts without requiring your customers to go through extra steps.

Prepare Your PDF Template

Before we can start generating PDFs with Fillable PDFs, we first need to prepare our PDF to be fillable. I’ve chosen the IRS 1099-MISC form.

When you open the PDF form in Adobe Acrobat, click the Prepare Form button to convert the PDF into a fillable PDF. Adobe Acrobat will go ahead and detect where in the form you might want to have the user enter text in directly.

This should take care of the majority of the fields in your form, but you might have to manually add some additional fields or change the placement of the automatically detected fields.

Once your fillable PDF fields are ready to go, save the document so we can add it to Gravity Forms.

Add Your Template

Now that you’ve prepared your PDF template to be fillable, we need to add it to the Fillable PDFs plugin.

With the plugin and your license key activated, go to Forms -> Fillable PDFs and click on the Templates tab. Here you’ll see a list of the Fillable PDFs template configured for your site.

To add a new template, click the Add New button at the top.

Next, select the PDF template file you created in the previous section. Fillable PDFs will recommend a template name based on the file name.

Click the Create Template button to upload the template. If your PDF file contains a lot of fields, it might take an extra minute or two for your new template to appear in the list while Fillable PDFs processes it.

Setting Up PDF Generation

With the PDF template file prepared and added as a template in Fillable PDFs, we can now setup PDF generation.

Go to the main Forms list in your WordPress admin. Hover over the form you want to add PDF generation to, mouse over the Settings link and click on Fillable PDFs inside the drop down menu.

Click the Add New button to create a new Fillable PDFs feed.

Selecting The Template

When creating a new Fillable PDFs feed, you are presented with two settings: the feed name and the template selector.

Enter in a feed name that unique identifies this PDF configuration.

Select the template you added in the previous step from the drop down.

After you’ve selected the template, you’ll see a preview of the first page of your template beneath the drop down along with a couple new settings.

Using the File Name setting, you can set the name of the generated PDF file. In the Notifications setting, you can choose which notifications to have the generated PDF automatically attached to. You can also configure conditional logic to set when the feed is run.

Mapping PDF Fields

Now, we need to map our Gravity Forms fields to our PDF template. Click the Open Mapper button next to the template drop down.

Your screen will now be filled with the visual template mapper. Each page of your PDF will be displayed with all the available PDF fields highlighted.

To map a Gravity Forms field to a PDF field, simply click on the highlighted field. A popover will appear allowing you to select which Gravity Forms field to map. You can also map Gravity Forms entry meta or a custom value using merge tags.

If you map a PDF field to a File Upload field, you’ll have the option to automatically embed the uploaded image into that PDF field. Signatures will also be embedded into mapped PDF fields.

Additional Settings

Once you’ve mapped all your Gravity Forms fields to your PDF template, click the X in the top right corner of the modal to exit the visual template mapper.

You can click on the Advanced tab to configure additional settings for the generated PDF.

The User and Admin Password settings will set a required password to view or make changes to the PDF, respectively.

The File Permissions setting allows you to control what the end user can do with the PDF, including if they can print, modify or copy it.

The Download Permissions setting defines who can download the PDF: anyone at all, anyone the link that contains the secure token or the logged in user that submitted the entry.

You can also choose to remove all the interactive form fields from the PDF, preventing the end user from making any modifications to the data entered.

When you’ve got everything configured, click Update Settings to save the feed.

Displaying a Link to the PDF

Now that we have a Fillable PDFs feed configured, any time a user submits the form, the PDF we’ve just configured will be generated.

Using Fillable PDFs’ available merge tags, you can provide a link to the user to download the PDF right from the form confirmation.

When editing a confirmation, click on the Merge Tags drop down icon. Toward the bottom of the list will be the Fillable PDFs group. Each Fillable PDFs feed you have configured will have three merge tags available: one that displays the PDF’s file name, one with the URL to the file and one that displays a clickable link to the file.