Featured image on the How To Guide: Search and Filter Gravity Forms Entries like a Pro

How To: Learn five simple (but powerful) ways to filter Gravity Forms entries for export with the Gravity PDF Bulk Generator add-on

More than meets the eye...

The Bulk Generator extension isn’t just about exporting all your Gravity Forms PDFs at once. It’s built directly into Gravity Forms’ Bulk Actions feature so you are able to sort, filter, and search for the entries you want to download. And this is all before using the Bulk Generator to further group your PDFs into directories and saving to a zip file. Talk about powerful!

If you haven’t come across the Bulk Generator plugin yet (or want to refresh your memory on how it works) take a look at this fantastic video tutorial showing off its features.

Control and Conquer

I want you to take full advantage of everything the Bulk Generator has to offer – and by extension, Gravity Forms, too! In this How To, I show you five useful tips to level up your Gravity Forms data management game 💪.

1. Export PDFs for entries submitted in the last X days, weeks or months.

Let’s begin with a common request: filtering by the date of submission.

On the Entries List Page you can use the search tool (located at the top right) to filter the entries based on a condition. To filter by a period, in the first Dropdown select the Entry Date option and then select the is greater than option from the second Dropdown. In the third box, select the start date you want to filter by and click Search.

As an example: let’s say today is June 1, 2020, (that’s 2020-06-01 in the date format Gravity Forms expects) and I want to get all entries submitted in the last seven days. To do this I would select 2020-05-25 in the third box and run the search. If I wanted to get the entries for all of May, I would select 2020-05-01. And if I wanted to get all entries for the past year, I would select 2019-06-01.

 

Once I’ve got all my entries, I can run the Bulk Generator by using the Select All checkbox in the first column of the table (and the subsequent Select all X entries link that appears if you’ve paginated entries), and select the Download PDF Bulk Action to kick-off the process.

2. Export PDFs for entries submitted within a date range

The entry search feature only allows you to add one conditional, and this makes it a little tricky if you want to filter by a range that doesn’t end in today’s date. A workaround is to use Gravity Forms search to filter by the start date of your range, use the Bulk Generator’s Directory Structure feature to sort the PDFs by date, and then delete any unwanted PDFs once you’ve downloaded the zip file.

Let’s take a look at this approach step by step…

I’m going to use the same method outlined in the first example in this guide to select the start date of the range I’m searching for. Let’s get all entries submitted between April 15 to May 15 by setting the Entry Date greater than search value (i.e the start date) to 2020-04-15.

Next, go through the standard process of selecting all entries, running the Download PDF Bulk Action, and selecting the desired PDFs to export.

We now need to adjust the Directory Structure setting so the PDFs are grouped together in a way that allows us to easily delete the documents we don’t want. For this example, we’ll group the PDFs by “Year/Month/Day”.

The mergetag {date_created:format:XYZ} used in the Directory Structure setting makes use of PHP’s native date() function to process the XYZ portion of the tag. Any valid parameter can be used to format the date.

In the following example, I first selected the Year, Month, and Day common tags to set up the basic structure of my folders. Then using the PHP documentation as my guide, I adjust the mergetags so that the folder names will be labelled using the format:

/Year/Month (in full)/Day + Day of the week/

When completed, your Directory Structure should have the following structure:

/{date_created:format:Y}/{date_created:format:F}/{date_created:format:d D}/

We’re now ready to run the build step and then wait for the generated zip file to download. After extracting all the files from the archive, you’ll be able to easily delete any folders you don’t want. In this example, I’ll delete all the directories after May 15.

3. Export PDFs for entries by payment status

If you use Gravity Forms to accept payments, this is a great filter to use!

First, set the search condition to Payment Status, and the second dropdown comparison to is, before choosing your desired status in the third dropdown.

You can then run the Download PDF Bulk Action to export these entries.

Bulk Generator Add-on Payment Status mergetag (Screenshot)

If you’d like to export the PDFs for all entries and group by the payment status, you can use the Payment Status common tag in the Directory Structure Bulk Generator setting.

In this example I used the Payment Status common tag to group all my PDFs into folders.

Pro Tip: If you offer multiple payment gateways, you can also group the PDFs by the payment type using the merge tag {entry:payment_method} in the Directory Structure! 👍

4. Export PDFs for Unread Entries then mark as Read

Gravity Forms has a couple of useful status filters (located above the top Bulk Actions feature) which allow you to easily show unread, starred, or trashed entries. For this example we’ll select the unread filter, choose our entries and run the Bulk Generator.

Once you’ve downloaded the zip file containing your PDFs, select the exact same entries again and run the Mark as Read Bulk Action. Easy, huh? ✅

5. Export PDFs for Unread entries with an additional search filter

You can combine the unread filter with the search condition to further refine the entries you export. Let’s export all unread entries that have a Payment Status of Paid.

Pro Tip: once you’ve completed the export, use the Bulk Actions feature again to mark those same entries as Read

Finishing up!

Give yourself a pat on the back; you’ve now learnt how you can take full advantage of Gravity Forms entry search and filter features to bulk export your PDFs! Use what you’ve learned to make your business processes even easier.

Did you find this How To guide useful? Tell your friends and tweet about it.

Happy (Bulk) PDFing!

Did you like this guide?
To learn more about the different features of Gravity PDF, subscribe to our newsletter!