Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocompletion for key field #4

Closed
CharlesNepote opened this issue May 10, 2021 · 0 comments · Fixed by #11
Closed

Autocompletion for key field #4

CharlesNepote opened this issue May 10, 2021 · 0 comments · Fixed by #11
Labels

Comments

@CharlesNepote
Copy link
Member

CharlesNepote commented May 10, 2021

Property (key) field should suggest existing properties while typing.

Tagify?

Open Food Facts uses Tagify library. Each field with a taxonomy has a simple HTML:
<input type="text" name="labels" id="labels" class="text tagify-me" value="" lang="en" data-autocomplete="https://world.openfoodfacts.org/cgi/suggest.pl?tagtype=labels&" />. The data-autocomplete opens the link
https://world.openfoodfacts.org/cgi/suggest.pl?tagtype=labels&term=Tes which returns a JSON array: ["Tesco Nurture","Alimentos Artesanos de Navarra","PDO Montes de Granada","PDO Montes de Toledo","PGI Garbanzo de Fuentesaúco","Sulfites and SO2 > 10ppm","With natural sulfites","With sulfites","Without sulfites"]

Folksonomy Engine current API

The list of keys is here: https://api.folksonomy.openfoodfacts.org/keys and returns:

[

    {
        "k": "test",
        "count": 2,
        "values": 2
    },
    {
        "k": "photo_front",
        "count": 1,
        "values": 1
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant