GravityView Support is Built-in to Gravity PDF
The GravityView plugin is one of the best way to display Gravity Forms entries publicly on your website. Basic GravityView support is built right into Gravity PDF, and advanced support is available using the PDF for GravityView extension. The documentation on this page will only cover the basic support, and you should refer to the PDF for GravityView documentation for the advanced feature-set.
PDF for GravityView is a premium Gravity PDF extension which offers deep integration with the View Editor. This turns GravityView into a powerful PDF builder, and makes it easy to generate PDFs of your Views. You'll save hours compared to replicating your view in code using a custom template.
Add PDF Download Link to View
You can easily add PDF Download links to your View. To do this you'll need to use GravityView's Custom Content Field.
Go edit your View in the admin area, click the + Add Field
button in the Multiple Entries or Single Entry tab, and click Custom Content. Next, go to your form's Manage PDF page, copy the [gravitypdf]
shortcode in the list and paste it into the View's Custom Content Field. Save the View and go check if it's working.
Adding a Gravity PDF shortcode to GravityView's Custom Content field.
The PDF Download links added to a GravityView table
Because of Gravity PDF's security, by default access to the PDFs is restricted to the entry owner or users with a capability found in the User Restriction setting. That means that you'd need to:
-
Using GravityView's Advanced Filter extension to show the entries from the current logged in user.
-
Using a Membership plugin that allows you to show/hide content based on user roles (Paid Memberships Pro comes to mind). You can display the GravityView to a user with a Role that includes one of the capabilities found in Gravity PDF's User Restriction setting – by default, this is only the Administrator role. Not sure what Roles and Capabilities are? Here's a great article from WPShout discussing the finer points.
Public Access
If you'd like anyone with access to your View to securely download the PDF(s), you can take advantage of signed PDF URLs. Just amend the [gravitypdf] shortcode added to the Custom Content Field and include the signed="1"
attribute:
[gravitypdf name="Default Template" id="56ea5a3b2c684" text="Download PDF" signed="1"]
Multiple Forms Extensions
If you're using GravityView's Multiple Forms extension and want to display a PDF from one of the joined forms the process is slightly different.
-
Add a new Custom Content field to your View for the specific form the PDF is setup on.
-
Copy the
[gravitypdf]
shortcode from the Manage PDF pageand paste it into the View's Custom Content Field created in step 1 -
Manually add the
entry
attribute to the shortcode and set the value to{entry_id}
[gravitypdf name="Default Template" id="56ea5a3b2c684" text="Download PDF" entry="{entry_id}"]
These steps will ensure the joined form's entry ID is used to create the PDF link, and not the primary form's entry ID.