# Can admin page filter can search by text?

**URL:** <https://forum.djangoproject.com/t/can-admin-page-filter-can-search-by-text/38811>\
**Category:** The Admin\
**Created:** [February 13, 2025, 1:51am UTC](https://forum.djangoproject.com/t/can-admin-page-filter-can-search-by-text/38811 "2025-02-13T01:51:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiawaik](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kiawaik/32/26886_2.png) [@Kiawaik](https://forum.djangoproject.com/u/Kiawaik)\
**Post date:** [February 13, 2025, 1:51am UTC](https://forum.djangoproject.com/t/can-admin-page-filter-can-search-by-text/38811/1 "2025-02-13T01:51:45Z")

</div>

Hello! I have a foreign key field staff\_id and when I try to add a filter for it, it will display a long list and it is hard to search.

Is there any way to change it to a text search? Many thanks.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/5/d/5d70812b039afae78f39fc289cd01963e5399d2f.png)

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [February 13, 2025, 2:40am UTC](https://forum.djangoproject.com/t/can-admin-page-filter-can-search-by-text/38811/2 "2025-02-13T02:40:30Z")

</div>

Welcome @Kiawaik !

Yes, there are ways of implementing the Select2 widget as a filter. However, there isn’t anything built-in and may take some effort on your part to build from existing options.

See the blog post at [Mastering Django Admin Part 2: Improving List Filters with Custom Select2 Integration | by Sudip Parajuli | Python in Plain English](https://python.plainenglish.io/mastering-django-admin-part-2-improving-filters-with-custom-select2-integration-6b41e4cff8e6) as one implementation.

Other resources include [django-admin-autocomplete-filter · PyPI](https://pypi.org/project/django-admin-autocomplete-filter/) (Note: This is sufficiently old that it might not work out-of-the-box, but you should be able to create your own copy and update it to get it to work.)

Also see [How can we use autocomplete dropdown (select2) for filters in Django Admin for normal fields?](https://forum.djangoproject.com/t/how-can-we-use-autocomplete-dropdown-select2-for-filters-in-django-admin-for-normal-fields/36136)

---

<div class="post-metadata">

**Author:** ![Kiawaik](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kiawaik/32/26886_2.png) [@Kiawaik](https://forum.djangoproject.com/u/Kiawaik)\
**Post date:** [February 13, 2025, 3:41am UTC](https://forum.djangoproject.com/t/can-admin-page-filter-can-search-by-text/38811/3 "2025-02-13T03:41:09Z")

</div>

Many thanks! It works using the Custom Select2! 😀
