Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Both name and nickname appear in autocomplete for the same entity #30

Open
sugaroverflow opened this issue Feb 23, 2015 · 3 comments
Open

Comments

@sugaroverflow
Copy link
Contributor

John put my name in (as Fatima Sarah Khalid) during CodeAcross and added a nickname/abbreviation field (as Fatima Khalid) but I'm coming up twice in the autocomplete.

screen shot 2015-02-23 at 10 24 39 am

I tried this with other entities that have abbreviations/nicknames and the same thing happens.

screen shot 2015-02-23 at 10 28 48 am

screen shot 2015-02-23 at 10 28 24 am

I'm not sure if this is something that we want to have.

@kenchandev
Copy link
Contributor

The reason I developed it in this manner is to give the user an option. For instance, maybe the user decides to type in "New York University" as opposed to "NYU." The user should be able to see this as a suggestion to validate his/her input. Both options will bring up the same node anyways.

@luisdaniel
Copy link

I had to do a similar autocomplete for OpenData500. I used a jquery autocomplete library. For this issue I have a look up json file where I keep name and a label. The label includes all the searchable items, so:

{
    "name":"New York University",
    "label": "New York University NYU"
}

jquery autocompletes looks through "label"'s but displays only "name". so if a user types "NYU", they'll see and select "New York University".

@kenchandev
Copy link
Contributor

Interesting, I didn't realize jQuery had an autocomplete library. I could generate another .json file rather than having to create an associative array inside the codebase. Awesome suggestion!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants