Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Working with ids? #12

Open
OleLaursen opened this issue Nov 28, 2011 · 2 comments
Open

Working with ids? #12

OleLaursen opened this issue Nov 28, 2011 · 2 comments

Comments

@OleLaursen
Copy link

With select boxes, the labels and the actual values of the options are decoupled so you can show a nice formatted text to the user and still get an id back to plug directly into the database. I couldn't find an easy way of doing that with your plugin?

@laktek
Copy link
Owner

laktek commented Dec 4, 2011

You can use the resultFormatter option to pass the formatted text to show (check the 7th example in the demo page). Then with the itemSelect event you can get a value (or an id) to send back to the backend.

@OleLaursen
Copy link
Author

Did you try doing this? I think I looked at the source code and concluded I might end up with a problem. I need to be able to control it the other way around too, i.e. I need to be able to choose a certain id/value if the user presses a button.

In any case, it's not easy to do. :) I don't think it's a bug, just a suggestion for something you may want to improve on. I realize it depends on whether you're using the combo box for free form input or as a select box with a fixed set of values.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants