Tag-Handler icon indicating copy to clipboard operation
Tag-Handler copied to clipboard

Support IDs instead of names

Open denen99 opened this issue 13 years ago • 4 comments

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 avatar Sep 16 '12 16:09 denen99

Just checking in, is this possible ?

denen99 avatar Oct 03 '12 12:10 denen99

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.

ioncache avatar Oct 03 '12 14:10 ioncache

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.

denen99 avatar Oct 03 '12 14:10 denen99

I +1 this request. It would be great.

pauletienney avatar Jun 19 '13 15:06 pauletienney