🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 20, 2026

How to Filter Gravity Forms Entries With AND / OR Rules, Dynamic Values and Role Rules

GravityExtra
How to Filter Gravity Forms Entries With AND / OR Rules, Dynamic Values and Role Rules

A Gravity Forms entry list is only as useful as its filter. A job board that still shows last month’s closed positions, a member area where people scroll past everybody else’s requests, a directory where the visitor cannot pick a city: in each case the entries are there, but the wrong ones are on the screen. Simple rules such as “Status is Open” get you part of the way. Real sites need more: this AND that, OR something else, different rules for staff and for guests, and dates that move with the calendar.

This tutorial walks through filtering Gravity Forms entries with AND / OR groups, dynamic values and role rules, using the Gravity Forms Entry Filter Builder Premium Add-on. The example is a logistics company, Bluefin, that publishes its job postings from a Gravity Forms form on a careers page.

A Careers at Bluefin page: a visitor filter form with a Department drop-down, Location checkboxes with Hamburg and Remote ticked, a Salary from range with a minimum of 50000, a Keyword box, an Apply filters button and a Reset link; below it a Frontend Entry View table showing 1 to 4 of 4 open jobs: Customer Success Lead, Senior Backend Engineer, Frontend Engineer and Support Engineer with location, salary and apply-by date
A visitor narrows the open jobs with the filter form above a Frontend Entry View table: only open, approved jobs can appear at all.

The Example: a Careers Page That Filters Itself

Hiring managers post jobs through a form with the fields Job title, Department, Location, Salary from, Employment type, Status (Open, On hold, Closed), Apply by and Description. Every posting is approved by HR before it goes public. The careers page should show visitors only the jobs they can still apply for, while HR managers want the full picture on the same page, including closed and unapproved postings.

Written as a sentence, the public rule is: Status is Open, and the posting is approved, and the apply-by date is today or later, or there is no apply-by date at all. The HR rule is simply: the visitor is an HR manager. Put together, it is one filter with two branches joined by OR, and the first branch has a small OR of its own inside. That nesting is exactly what a flat list of conditions cannot express.

Step 1: Create a Filter Set

After activating the add-on, open Forms → Entry Filters and click Add filter set. Name it “Open jobs”, pick the Job postings form and continue. The builder opens with one empty group and a live preview on the right that counts the matching entries.

Step 2: Build the Rules With Groups

Switch the outer group to Match ANY of these, because either branch is enough. Click Add group for the public branch and set it to Match ALL of these. Inside it add three things: Status is Open, Approval status is Approved, and another group set to ANY with Apply by is on or after today and Apply by is empty. Finally add a condition to the outer group: Visitor role has the role HR Manager.

The Show entries that match box of the builder: an outer Match ANY of these group holding a Match ALL group with Status is Open, Approval status is Approved and a nested Match ANY group with Apply by is on or after today or Apply by is empty, and next to it, joined with OR, the condition Visitor role has the role HR Manager; each group has Add condition and Add group buttons
Nested AND / OR groups: open, approved jobs that still take applications, or every job for HR managers.

Two details make this rule robust. First, “today” is a word, not a fixed date: the filter moves with the calendar, so a job disappears from the careers page the day after its deadline without anyone touching it. Second, the role condition is about the visitor, not about the entry. The add-on decides it before searching, so for an HR manager the whole filter becomes “every entry”, and for everyone else that branch simply drops out.

Switch the preview between You, A logged-out visitor and a user of each role. In the example the preview shows 12 of 18 entries for a visitor and 18 of 18 for the HR manager. It is the fastest way to check a rule before anybody else sees it.

Step 3: Let Visitors Narrow the List

The rules decide what may be shown at all. Visitors often want to go further: only Engineering, only Hamburg or remote, only jobs above a certain salary. Add Visitor filters in the builder: a drop down for Department, checkboxes for Location, a number range for Salary from and a search box over the job title and the description. Each one becomes a field of a small form above the entries.

Visitor filters can only narrow the result. A visitor who edits the page address cannot reach closed postings, because the filter set is always applied first and every visitor value is checked against the field’s choices and formats on the server. Values that do not fit are ignored, and search text is treated as plain text.

Step 4: Attach It to a View or Use the Block

If you show entries with the Frontend Entry View add-on, tick the view under Where to use it and save. The filter set now applies to the table or cards of that view, to its counts and pages, its own search box, its single-entry pages, its CSV export and its edit and delete buttons. A closed job cannot be opened with an old link, and a CSV download contains exactly the rows the visitor was allowed to see.

You do not need another add-on to show the entries, though. The Filtered Entries block lists the entries of any filter set as a table or as cards, with the columns you choose, a count, pages and the same visitor filter form. Add it in the block editor, pick the set and publish.

A Job board page with the Filtered Entries block: a filter form with Department, Location checkboxes, a salary range and a keyword box, the text 12 entries, and six cards in three columns, each with the job title and the department, location, salary and apply-by date, plus page links 1 and 2
The Filtered Entries block shows the same filter set as cards, with the count and pages, without any other add-on.

Three More Rules Worth Knowing

Each user sees their own entries

A member area, a client portal or a “My postings” page needs entries filtered by the logged-in user. Use Submitted by (user ID) is {user:ID}. The braces are a dynamic value: the add-on fills in the ID of the visitor. If nobody is logged in there is no ID, and the condition matches nothing, so a logged-out visitor never sees a list of everybody’s entries. Add Visitor role has the role Administrator in an ANY group and administrators see every entry on the same page.

One page, many links

With Department is {get:dept} the department comes from the page address. A link to the jobs page with dept=Sales lists the sales jobs, dept=Operations the operations jobs, and the page without a department shows a friendly “pick a department” text instead of everything. One page and one filter set serve every department, and every link can be shared or bookmarked.

Moving dates and periods

Date conditions understand plain words and periods: Date submitted is in the period Last 7 days for a “new this week” list, Event date is in the period Next 30 days for upcoming events, or Renewal date is before 30 days ago for overdue renewals. Dates follow the site time zone, so “today” means the same day for the site and its visitors, even though Gravity Forms stores submission times in UTC.

More Recipes

  • Paid orders only: Payment status is Paid, for a list of confirmed registrations or bookings.
  • Starred highlights: Starred is Yes, so the team can pick featured entries in the Gravity Forms Entries screen with one click.
  • Regional teams: Region is {user:region}, where region is a field in each user profile, so every regional manager sees the requests of their own region.
  • Staff see drafts, guests see approved: an ANY group with Approval status is Approved and Visitor capability has edit_posts.
  • Fresh leads: Date submitted is in the period Last 7 days AND Status is none of Won, Lost.
  • Exclude test entries: E-mail does not contain the domain of your own team, and User IP is not the address of the office.

Good Practices

  • Write the rule as a sentence first. Every “and” is an ALL group, every “or” is an ANY group, and every pair of brackets is a nested group.
  • Prefer moving dates such as today or 7 days ago over fixed dates, so the filter keeps working next month.
  • Put role rules on the outside. A visitor condition in the outer ANY group switches the whole filter for that role, which is easy to read later.
  • Check from the other side. Use the preview for a logged-out visitor and for each role before you publish.
  • Keep visitor filters short. Three or four well-chosen filters help more than a form with every field.

Frequently Asked Questions

Do the filters slow the page down?

The rules run inside the normal Gravity Forms entry search on the server, with one search per group, and the result is reused within the page. Nothing is filtered in the browser.

Can visitors get around the filter?

No. The filter set is applied on the server to every request of the page and its views, including single entries, exports and edits. Visitors can only narrow the list further.

Which operators are there?

Is and is not, contains and does not contain, starts and ends with, greater and less than (or equal), between, any of and none of, empty and not empty, and date periods such as this month or the next 7 days.

Does it need Frontend Entry View?

No. The Filtered Entries block works on its own. With Frontend Entry View the filter sets also apply to its table, list and card views.

Which Gravity Forms version do I need?

Gravity Forms 2.9 or newer with WordPress 6.5 and PHP 7.4 or newer.

Show Exactly the Entries You Mean

AND / OR groups, dynamic values, rules per role and a filter form for visitors, for Frontend Entry View views or on any page.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr