Skip to content

Support IDs instead of names #20

Description

@denen99

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?

Activity

  1. denen99 commented on Oct 3, 2012

    @denen99
    Author

    Just checking in, is this possible ?

  2. ioncache commented on Oct 3, 2012

    @ioncache
    Owner

    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.

  3. denen99 commented on Oct 3, 2012

    @denen99
    Author

    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.

  4. pauletienney commented on Jun 19, 2013

    @pauletienney

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions