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

Support IDs instead of names #20

Open
denen99 opened this issue Sep 16, 2012 · 4 comments
Open

Support IDs instead of names #20

denen99 opened this issue Sep 16, 2012 · 4 comments

Comments

@denen99
Copy link

denen99 commented Sep 16, 2012

hi,

Is there a way to support IDs when submitting the form instead of the names? This would require returning a map of elements in the form of id/name to the autocomplete plugin, name for the end-user and ID for what gets submitted via the form.

Is this possible?

@denen99
Copy link
Author

denen99 commented Oct 3, 2012

Just checking in, is this possible ?

@ioncache
Copy link
Owner

ioncache commented Oct 3, 2012

Hey Adam,

Sorry for the late reply.

Right now there isn't a way to do this easily.

You might be able to cobble something together using the updateData options and stuff in a list of the ids you want in there when doing the submit using an event.

What would be the ideal thing here for you? A flag to submit the ID of each tag instead of the Value of each tag? This would require some additional support as right now the tags don't have IDs by default, so support would be needed to accept key/value pairs when instantiating the IDs.

Do you have any sort of example you could show me where you would want to use this?? I might be able to figure something out for you int he meantime.

@denen99
Copy link
Author

denen99 commented Oct 3, 2012

No worries, I know that someone did this with typeahead , see here https://github.com/tcrosen/twitter-bootstrap-typeahead. Basically this enables you to load a json payload of ID/NAME and display NAME for autocomplete but use ID in the form submit.

@pauletienney
Copy link

I +1 this request. It would be great.

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

3 participants