hlsolutions / jquery-autosuggest

An AutoSuggest jQuery plugin.
http://hlsolutions.github.io/jquery-autosuggest/
GNU General Public License v2.0
15 stars 3 forks source link

Maintain id/name of original element #17

Closed t3chn0r closed 11 years ago

t3chn0r commented 11 years ago

Maintain the id and name of the original element in the new element created to store the selected values. This makes it easier to retrieve the values server side.

I had to create a new PR as I couldn't find a way to edit the previous one, sorry about that.

knalli commented 11 years ago

Hi,

it takes some time to figure out why Travis won't work anymore. Anyway, the master should be fine again.

However, I cannot pull your commit because it breaks a lot of the test cases: https://travis-ci.org/hlsolutions/jquery-autosuggest/builds/5206305. I will see what I can do.

I've created a separated branch https://github.com/hlsolutions/jquery-autosuggest/tree/pr16 which contains already your commit.

knalli commented 11 years ago

I've taken a different approach and filed it into our master: https://github.com/hlsolutions/jquery-autosuggest/commit/09b7ec1327b51590efb9a81654188cdaf88440a7

Two bits on that:

  1. Using the input field as a "hidden field" does not work, could not figure out why. And I'm actually over my time now..
  2. Adding a new hidden field with the same element id like the origin input field creates the bad scenerio that two elements with the same id will exist in the DOM. That isn't acceptable because all browsers handle that differently because its violates the specs.