Page 4 of 5

Displaying suggestions in input box

Posted: Wed May 20, 2015 8:22 pm
by Ellen Schlechter

Or does anyone know what components might have been used?


Displaying suggestions in input box

Posted: Wed May 20, 2015 11:42 pm
by EJLD

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 !


Displaying suggestions in input box

Posted: Thu May 21, 2015 3:14 am
by Ellen Schlechter

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.


Displaying suggestions in input box

Posted: Thu Jun 25, 2015 10:30 pm
by Jafet Ramirez

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


Displaying suggestions in input box

Posted: Fri Jun 26, 2015 7:50 pm
by Illya Stepanov

Hi -

Please specify your question with more details.


Displaying suggestions in input box

Posted: Fri Jun 26, 2015 9:14 pm
by Jafet Ramirez

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.


Displaying suggestions in input box

Posted: Fri Jun 26, 2015 11:51 pm
by Evgene Karachevtsev

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?


Displaying suggestions in input box

Posted: Sat Jun 27, 2015 12:54 am
by Jafet Ramirez

Apologies, will be try something else


Displaying suggestions in input box

Posted: Sat Jun 27, 2015 6:47 am
by EJLD

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


Displaying suggestions in input box

Posted: Sat Jun 27, 2015 12:42 pm
by Jafet Ramirez

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