---
title: "Only show choices in the Search Bar that exist in entries"
date: 2026-04-23
updated: 2026-09-01
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview/advanced/show-choices-that-exist/"
category: "GravityView > Advanced"
---

In the GravityView Search Bar widget, you may want to only display choices that exist in submitted entries (as opposed to showing all choices for each field).

**Here's an example**: your form has a **Department** Drop Down field listing all 120 departments in your organisation, but entries have only ever come from 15 of them. You may wish to show just those 15 in the Search Bar, instead of all 120.

⚠️ **It's important to understand the implications of enabling this option**. Pre-filtering choices will “show” what values have been selected for all submitted entries in a form, not just the filtered entries shown in a View. That means that even if you have filtered the entries in your View using advanced filters, the search fields will still show all the options.

## Enable it in the View editor

The setting lives on each individual search field rather than on the Search Bar as a whole. Open the Search Bar settings, then click the gear icon beside the field you want to change.

![The Search Bar settings with the gear icon beside an individual search field highlighted](https://www.gravitykit.com/wp-content/uploads/2026/09/doc-field-gear-1024x543.png)
In that field's settings, find **Pre-Filter Choices** and select "Only show choices that exist in form entries"![A search field's settings showing the Pre-Filter Choices radio options highlighted](https://www.gravitykit.com/wp-content/uploads/2026/09/doc-prefilter-setting-618x1024.png)**Pre-Filter Choices only appears on fields that store their own list of choices**: Drop Down, Radio Buttons, Checkboxes and Multi Select. On those you type the options yourself and they are saved with the field, and that saved list is what the setting narrows.

Other fields are built from several inputs rather than from a list of choices. An Address field is a single field made up of six inputs: street address, address line 2, city, state, ZIP and country. A Name field is put together the same way, from prefix, first, middle, last and suffix. Those inputs share the parent field's ID, so if your address is field 2, its country input is 2.6 rather than a field in its own right. GravityView offers each input separately in the Search Bar, which is why an address's country can look like a Drop Down field when it is not one.

Pre-Filter Choices is not offered on those fields, or on their individual inputs. Gravity Forms builds an Address field's country and state dropdowns from its own built-in lists while the form is being rendered, so nothing is saved with the field for the setting to narrow.

## Enable it with a filter (advanced)

To limit searchable **drop-down fields** to only values that have been submitted, add this filter:

```
add_filter( 'gravityview/search/sieve_choices', '__return_true' );
```

If you want to limit this behavior to specific Views and specific form fields, modify this code:

```
// Only show used choices in entries for View ID 4 and Field ID 6
add_filter( 'gravityview/search/sieve_choices', function( $sieve, $filter, $context ) {
    if ( 4 === $context->view->ID && 6 === (int) $filter['field'] ) {
        return true;
    }
    return $sieve;
}, 10, 3 );
```

**Note**: This will match both the choice label and the choice value.