Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

ViewsView Builder
Filtering Entries

Filtering Entries

What is a filter? A filter allows you to display form entries that meet specific criteria. For example, if you had customers and employees give feedback on a product in a form, you could filter out the customers' feedback, leaving only the employees' feedback displayed in the View.

When filtering entries, you can apply multiple filters to a single View. The result will only display entries that meet all filters. For example, if you have the filters listed here...

Filter Example

...your View will only display entries where the Name (Last) equals to "Doe" AND the Name (First) equals to "Jane".

Basic filtering

If you want to create a basic filter, you can go into the View builder and click the Filter entries link. View Filter Settings

To add another filter, click the Add filter button below the fields and customize it to fit your needs. View Layout Filter Entries Comparison

Comparison options

The View filter comparison field includes these options: equals, does not equal, is greater than, is less than, is greater than or equal to, is less than or equal to, contains, does not contain, starts with, ends with, is unique (get oldest entries), and is unique (get newest entries).

  • Contains: Select this search filter to only look for values entered in the search box that contains a specific word or phrase.
  • Does not contain: Select this search filter to only look for values entered in the search box that does NOT contain a specific word or phrase.
  • Starts with: Select this search filter to only look for values that begin with the input entered in the search box.
  • Ends with: Select this search filter to only look for values that end with the input entered in the search box.
  • Is Unique (get oldest entries): Select this search filter to only look for unique values (i.e., a value that is not duplicated) entered in the search box, sorted by the oldest entries.
  • Is Unique (get newest entries): Select this search filter to only look for unique values (i.e., a value that is not duplicated) entered in the search box, sorted by the newest entries.

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Advanced filtering

It can be very helpful to filter Views based on parameters in the URL, the current user, date ranges, etc.

By Current User

If you would like to allow your users to see only their submitted entries, edit your View and click the Filter Entries link. Add a filter that says "User ID equals to current_user". This will only work if you have a User ID field in your form. Filter by User ID

Note: No entries would appear when using "OR" filter when filtering by current_user if the user was not logged in.

By Parameter

The ability to filter by a URL parameter is often used when creating advanced search forms. You may pass parameters to a View through the URL or through the View shortcode.

If you would like to filter entries based on a parameter, add a filter that says "Specific field equals to [get param="param_name"]". By default, a filter will be ignored if the parameter is not set or if the parameter value is blank. Filter by Parameter If you would like to prevent entries from showing when the parameter is not set, you can add the default option to your filter like this: [get param="param_name" default="none"]. Filter by Parameter - Default

Note: All entries would appear when using "OR" filters when filtering by a [get] shortcode that does not exist.

By User ID

You may want to create a view that an administrator can select a User to filter entries by to only see the entries of a selected user. This is similar to filtering by parameter, because you will need a separate search form.

  1. Create a search form. This form will have a single User ID field, and will redirect to the view on submit. Set the Redirect to URL to yoursite.com/your-page/?my-user=[x] where x is the User ID field ID.
  2. Add this filter so that User ID fields will display as dropdowns on the front-end.
  3. Create a view from the form from which you want to view user's entries.
  4. Add a filter in the View builder that says "User ID equals to [get param=my-user]" View Filter User ID
  5. Publish the view.

Now you can select a User in the User ID search form and view their entries for a specific form.

By User Meta

If you have the Formidable Forms add-on for WordPress User Registration, you can filter a view by user meta stored in a user's profile. For example, if you have an "Age" field in your form and your user's have a user meta field for "Age" stored in their profile, you could add a filter like the following to only show results where the user's age matches the age stored in the entry: Age equals to [user_meta key=user_age]. View Filter User Meta

Replace user_age with the appropriate key for the respective user meta from the user's profile.

By User Role

Depending on the user role, the View can be customized to display only the entries submitted by users with the same role. For example, Subscribers can only view entries submitted by other Subscribers, and Editors can only view entries submitted by other Editors. You can do this by following the steps below:

  1. Add a hidden field in the form used for collecting entries for display.
  2. Set the default value with the [user_role] shortcode. View Filter Hidden field User Role
  3. In the View Builder → Filter Entries section, add a filter like the following: Hidden field equals to [user_role] View Filter User Role

By Date

You may filter entries by the date they were created or updated. You may also filter entries by a date field in your form. When filtering by date, you may use any date string that is accepted by the PHP strtotime() function. The following are commonly used date strings:

  • NOW: Get the current date and time. You can use [date format='Y-m-d H:i:s'] as an alternative.
  • 2016-01-31: Insert any date in the Y-m-d format.
  • Next Thursday: Get the date for next Thursday.
  • Last Monday: Get the date for last Monday.
  • first day of this year: Get the first or last day of the year, month, or week. Use 'first' or 'last', along with 'year', 'month', or 'week'. PHP requires English for turning phrases like this into a date.
  • +1 day: Get the date by going back or forward by day. Use + to go forward and - to go backward.
  • +1 week: Get the date by going back or forward by week. Use + to go forward and - to go backward.
  • +1 year: Get the date by going back or forward by year. Use + to go forward and - to go backward.
  • +1 week 2 days 4 hours 2 seconds: Get the date with any combination of weeks, days, hours, and/or seconds.
  • [date format='Y']-01-01: Get the first day of the current year without English. This example is the same as 2019-01-01. Or the first day of the current month is [date format='Y-m']-01.

If you would like to only show upcoming events, add a filter that says "Date field is greater than NOW". If you would like to show entries that were created in the past week, add a filter that says "Creation date is greater than -1 week". Please note that if you choose to filter by a specific date, you must use the "Y-m-d" date format in the View filter.

By Entry Status

If you have a a mixture of draft entries and complete entries, you may filter the entries by their entry status. By default, a View will include complete entries. You can filter by any of the following:

  • Draft or complete entry: This will include both drafts and complete entries.
  • Draft: This will include only draft entries.
  • Complete entry: This will include only complete entries.

Filter by Entry Status

If you want to display additional info in the view if the entry is a draft, you can use the [if is_draft] conditional.

Troubleshooting

When using filters, if you find that your entries are not being filtered correctly, here are a few things to check:

  • Check to ensure there are entries that exist which meet all filters.
  • If you are filtering from parameters in a URL, check the URL. Do the parameters appear and are they correct? If so, check if the parameters match up with the parameters set in your View filters.
  • If you are searching a checkbox or multi-select dropdown field, are you searching for any values between 1 and 9? If so, the entries will not filter properly due to the serialization that occurs for checkbox and multi-select dropdown field values when saved to the database.

If you have reviewed the above steps and are not able to solve the problem, please post in the help desk for further assistance.

No results on WPEngine

When many entries are included in the results, there is a possibility WPEngine servers will stop the query. When this happens, no results are returned and the view will display the 'No Entries' message.

To prevent this from happening, add this in your wp-config.php:

define( 'WPE_GOVERNOR', false );

Examples

Show entries for the upcoming week

Imagine you have a form that tracks appointments, and you want to show entries for the upcoming week. Simply add two filters: "Date field is greater than NOW" and "Date field is less than +1 week." Filter Date

Show all entries submitted by due date

Let's say that you have a form that has a deadline, and you want to display all entries that were submitted or updated before the set deadline. You can do so by setting up your filters like this: "Entry updated date is less than NOW." Filter Deadline

Show all entries created for current year

If you want to display all entries created in the current year, simply add a filter like this: "Entry creation date is greater than or equal to first day of January this year." Filter Current Year

The entry creation date uses a date-time format, which means time is taken into account with the creation date. e.g. 2022-02-09 at 11:33 am

Filter by user group

This example filters by user meta to display the correct form entries. Let’s say you have a form that is shared between two groups, and you want to filter the entries accessed by each group. You can do this by following the steps below:

  1. Each user should have a group name saved in a custom field on the user profiles. If this isn't already saved, you can add it using a user registration or profile form.
  2. Add a hidden field in the form used for collecting entries for display.
  3. Set the default value to the group name from the user profile with the [user_meta] shortcode. For example, you can use: [user_meta key=user_group]. View Filter Hidden field Group of Users
  4. In the View Builder → Filter Entries section, add a filter like "Hidden field equals to [user_meta key=user_group]". This will only show results where the user's group matches the group name stored in the entry. View Filter by Group of users

Apply alphabetical filtering to a View

Alphabetical filtering allows users to find entries that start with a specific letter. Follow these steps to set up alphabetical filtering for a View using the [frm-letter-filter] shortcode.

  1. Assign a parameter. Choose the field you want to filter, and then assign a parameter. For example, if your field name is Business Name, your parameter could look like this.
    [get param=bf]
  2. Set up a filter in the View. Add a filter where the field name starts with the parameter: Business Name starts with [get param=bf] Filtering for <ul class="frm_plain_list frm_inline_list frm_full_row"><li><a href="?">All</a></li><li><a href="?lname=a">A</a></li><li><a href="?lname=b">B</a></li><li><a href="?lname=c">C</a></li><li><a href="?lname=d">D</a></li><li><a href="?lname=e">E</a></li><li><a href="?lname=f">F</a></li><li><a href="?lname=g">G</a></li><li><a href="?lname=h">H</a></li><li><a href="?lname=i">I</a></li><li><a href="?lname=j">J</a></li><li><a href="?lname=k">K</a></li><li><a href="?lname=l">L</a></li><li><a href="?lname=m">M</a></li><li><a href="?lname=n">N</a></li><li><a href="?lname=o">O</a></li><li><a href="?lname=p">P</a></li><li><a href="?lname=q">Q</a></li><li><a href="?lname=r">R</a></li><li><a href="?lname=s">S</a></li><li><a href="?lname=t">T</a></li><li><a href="?lname=u">U</a></li><li><a href="?lname=v">V</a></li><li><a href="?lname=w">W</a></li><li><a href="?lname=x">X</a></li><li><a href="?lname=y">Y</a></li><li><a href="?lname=z">Z</a></li></ul> shortcode
  3. Insert shortcode for filtering. In the Before Content section, add the shortcode with the parameter. This enables alphabetical filtering based on the field name.
    [frm-letter-filter param=bf]

    Insert <ul class="frm_plain_list frm_inline_list frm_full_row"><li><a href="?">All</a></li><li><a href="?lname=a">A</a></li><li><a href="?lname=b">B</a></li><li><a href="?lname=c">C</a></li><li><a href="?lname=d">D</a></li><li><a href="?lname=e">E</a></li><li><a href="?lname=f">F</a></li><li><a href="?lname=g">G</a></li><li><a href="?lname=h">H</a></li><li><a href="?lname=i">I</a></li><li><a href="?lname=j">J</a></li><li><a href="?lname=k">K</a></li><li><a href="?lname=l">L</a></li><li><a href="?lname=m">M</a></li><li><a href="?lname=n">N</a></li><li><a href="?lname=o">O</a></li><li><a href="?lname=p">P</a></li><li><a href="?lname=q">Q</a></li><li><a href="?lname=r">R</a></li><li><a href="?lname=s">S</a></li><li><a href="?lname=t">T</a></li><li><a href="?lname=u">U</a></li><li><a href="?lname=v">V</a></li><li><a href="?lname=w">W</a></li><li><a href="?lname=x">X</a></li><li><a href="?lname=y">Y</a></li><li><a href="?lname=z">Z</a></li></ul> shortcode in View Before Content

  4. Publish the View. Once set up, publish your View. Users can click letters to filter results, displaying only fields that start with the selected letter.

Advanced customizations

If you need to customize your View filters with PHP, you may use the frm_where_filter hook or the frm_filter_where_val hook. Please be aware that we do not recommend using custom PHP if you are not comfortable writing and debugging PHP.

If you want to build if statements in a View to check if the current user is the owner/creator of the entry, use the frmpro_fields_replace_shortcodes hook.

Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Special offer unlocked.
    Get 55% OFF!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms