Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Associative array - key value pairs. #16809

Closed
lordspace opened this issue Jan 1, 2016 · 4 comments
Closed

Associative array - key value pairs. #16809

lordspace opened this issue Jan 1, 2016 · 4 comments
Milestone

Comments

@lordspace
Copy link

is it possible to have key value pairs?

<select name="country_code">
   <option value="ca">Canada</option>
</select>
@lordspace lordspace changed the title Associative array Associative array - key value pairs. Jan 1, 2016
@haroldiedema
Copy link

I was wondering this as well!
Solved it with a "dirty" workaround by comparing the user-defined value with a value of my array.

👍

@herregroen
Copy link

#16774 implements this functionality. It's been open a while though but you could use it directly from source if you need it.

@vlazar vlazar added this to the v1.1 milestone Jan 31, 2016
@vlazar
Copy link
Collaborator

vlazar commented Feb 15, 2016

To everyone interested in differentiating value from displayed text, aka key/value feature, aka array of objects feature.

The code is ready and it's almost 100% backward compatible. To ensure everything working fine for you we need your help with testing it in the wild before it's released. See this PR: Separate label/value for each suggestion in list

@vlazar
Copy link
Collaborator

vlazar commented Mar 12, 2016

Separate label/value is landed #16866
It is also possible to initialize list with separate label/value via <datalist> or <ul>.

Read about different label and value at the end of Basic usage section and about new data method at the end of Extend section.

@vlazar vlazar closed this as completed Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants