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 7163325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:53:03+00:00 2026-05-28T13:53:03+00:00

I have a model hierarchy that looks something like this: Office | +– Person

  • 0

I have a model hierarchy that looks something like this:

Office
   |
   +-- Person

That is, every Office has multiple Person.

I want to allow a user to select a Person using an autocomplete text input field (using jQuery UI Autocomplete). In this text input field, I allow the user to type text, which is matched server-side against the last name, first name, and login of the Person to find matches to suggest to the user while he/she is typing.

Recently I ran into the problem where sometimes users only know limited info, like the Office name and the first name of the Person. They can’t simply type “John” into the autocomplete field, as it will match hundreds of “John”s, and they have to scroll through all of these, searching for the one in the right Office.

My question is, what’s the best way to allow users to search for a Person using criteria from both Office and Person?

I’d prefer to keep the UI as sleek and minimal as possible, so I’m trying to stay away from multiple fields, overlayed lookup popups, and things of that nature.

  • 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-28T13:53:04+00:00Added an answer on May 28, 2026 at 1:53 pm

    Check out http://jquery.bassistance.de/autocomplete/demo/ then click

    “Click here for an autocomplete inside a thickbox window.”

    For a demo on their plugin. This implements compound autocomplete, which you could use to maybe use Person as the primary record and the office as the smaller information on the bottom. It may take some tweaking to get it to match the way you want, such that a space would start a new expression.

    Example:

    currently john west does not match

    John Smith
    Office: West Park
    

    but delimiting by space for a new expression would match the name and office simultaneously.

    You can, however, currently match that entry by typing either John or west

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

Sidebar

Related Questions

I have a view hierarchy that looks something like this: UIView (A) UIView >
If I have a model that looks like this: and I do a Linq
I have model Article it has field title with some text that may contain
I have model like this: scope :search_posts, lambda { |query| mega_posts.where( title LIKE ?
I have an XML document that models this hierarchy of tasks: 1 Customer 1.1
I have an object, RenderComponent , that has a property named Model that is
I have three Django models that exist in a hierarchy: Protocol -> has Test
I have model Foo which has field bar. The bar field should be unique,
If I have Model.objects.all() I want to get only one object for any content_object=foo,
In my controller I have model operations that can return empty results. I've setup

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.