How to store the tagged values (like gmail to field) as a string in a variable using html and javascript

StackOverflow https://stackoverflow.com/questions/23425607

質問

Anyone please tell me a solution to solve this problem. am using magicSuggest plugin to achieve a search box like autosuggestion drop down field. and i got it working with database entries. but now am not able to get the value that selected by the user and displayed as a tag or like a token in a text box field. i want to get the value as a string not as a tag or token like http://nicolasbize.github.io/magicsuggest/

i need a solution like exactly stack overflow's tags field above the post your question button in the post question page.

Thanks in advance

役に立ちましたか?

解決

  • getValue() will return an array of values as specified by the valueField property (default to id)
  • getSelection() will return an array of records with all of their properties.

So dependeing upon your JSON records, you could easily get the values using one of those methods.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top