Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6080863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:06:36+00:00 2026-05-23T11:06:36+00:00

Is it possible to filter an inline autocomplete field by a dynamic value entered

  • 0

Is it possible to filter an inline autocomplete field by a dynamic value entered by a user?

For example, I have a an admin form where staff enters games information including home and visiting team, game date and time, score, etc. They also enter individual player names and stats. I would like to add a filter to show only the players on either the home or visiting team.

I am using the InlineAutocompleteAdmin module, which provides autocomplete hints for input fields.

Here is the current inline autocomplete code:

class IndividualFootballGameInline(InlineAutocompleteAdmin):
    model = IndividualFootballGame
    extra = 1
    related_search_fields = {
        'player': ('player__first_name', 'player__last_name', '#team__sport__sport=Football', '#team__season__season_start_date__year=' + str(get_current_season_start_year('football'))),
    }

If this can be accomplished, can you explain how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:06:37+00:00Added an answer on May 23, 2026 at 11:06 am

    InlineAutocompleteAdmin provides a template that I modified to provide this functionality. The file templates/admin/autocomplete/inline_searchinput.html defines the jQuery lookup() function. I added additional code to check for values in the visiting and home teams field, and to append them to search_fields as needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to filter on a particular joined-subclass in NHibernate? For example, I
Is it possible to filter HTTPs traffic? For example via a TDI filter? Or
Is it possible to filter out subsets of the data that have small numbers
Is it possible to filter specific select options? I have a code : <select
I have a lot of user generated content that has inline images in it,
Is it possible to filter a Django queryset by model property? i have a
I have links like this www.somestuff.com/index.php?getsome=1:someInt:3 Is it possible to filter out the 1
Possible Duplicate: PHP: Filter array I have a PHP array containing strings of random
Is it possible to filter the contents of a Listbox in a Windows Forms
Possible Duplicate: How do you implement a good profanity filter? I am developing a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.