Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Displaying suggestions in input box

Or does anyone know what components might have been used?

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Displaying suggestions in input box

hi there, not sure to understand your question.
you shall look for the jquery autocomplete feature.
it requires a special library as dependency,
use the input component.
With some code, you can bring up the suggestions as an itemList.
good luck !

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Displaying suggestions in input box

I just wanted to know the components used. I have the input but I don't want the list of suggestions to take up too much space but I can't get it to be mini. I also like the format that they used in the example above but I don't know how to accomplish it. I know how to populate whatever list I decide to use but I don't know which components will get me what I want if that makes any sense.

Jafet Ramirez
Posts: 0
Joined: Thu Jun 25, 2015 10:30 pm

Displaying suggestions in input box

Hi! How about this for suggestions from an actual database table?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Displaying suggestions in input box

Hi -

Please specify your question with more details.

Jafet Ramirez
Posts: 0
Joined: Thu Jun 25, 2015 10:30 pm

Displaying suggestions in input box

Hello!

I wish to create suggestions for end users when they are entering characters as input.

The suggestions should come from a collection. In the apps database.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Displaying suggestions in input box

Hello Jafet,

Unfortunately your issue is still not clear for us. Could you please clarify what have you tried and what exactly does not work?

Jafet Ramirez
Posts: 0
Joined: Thu Jun 25, 2015 10:30 pm

Displaying suggestions in input box

Apologies, will be try something else

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Displaying suggestions in input box

in fact, i made something similar to what your are aiming at.
what I did is :
0/ on page load, a distinct query retrieves the contents of a table field and places it into a localstorage,
1/ the user keys a character in a input control,
2/ on keyup it fires a function that walk through the localstorage and retrieves words (your suggestions) with the matching character(s) (using .indexOf(...) )
3/ the sorted result is enriched with html tags to make a list of words,
4/ then the html string is placed into an html component slidingDown nxt to the input control (using getElementByID('myHTMLcomponent').innerhtml = myList)
5/ on word click (using 'span') it fires a function that will place the clicked word into the input box.

it works quite fine and can always be improved. /span

Jafet Ramirez
Posts: 0
Joined: Thu Jun 25, 2015 10:30 pm

Displaying suggestions in input box

That sounds interesting, I'll work on it and let you know how it comes out!

Return to “Issues”