Dropdown key value pair

plugins

#1

are there any ways to use keyvalue pair for dropdown plugin.


#2

You could set an id with a string you build dynamically, that could serve as your key/value.


#3

That means dropdown text will be - “key” + “value” then spit the text as needed ?
correct me if i misunderstood. because i did completely same thing.


#4

No, I was suggesting you set to each child of the dropdown an id, which will serve either as the key, or the value. And the text property of each child will be the other part of the pair (value or key, depending which you chose to use in the id property).


#5

can you provide me any code snippet of what you trying to say.
Thanks in advance.


#6

Hi, here is an example: