jquery autocomplete using only last word of input string

Viewed 215

I want to create an input box where user input a string and get help from jquery AUTOCOMPLETE function to complete ONLY the current word and when a user selects something from autocomplete suggested list, only that word is rewritten not the whole sentence(input string).

Example Input String: "LION IS A WILD ANIMAL"

So when user is writing "LION IS A WILD ANIM", autocomplete should suggest "ANIMAL" and on selecting it "ANIM" is replaced by "ANIMAL" and the input string is "LION IS A WILD ANIMAL"

Is there any provision to supply the "input string" for match instead of using the input value box value as the "input string".

0 Answers
Related