datadesk/jquery-geocodify — pull request #49 by louh (2014-04-27 01:02:45+00:00)
Title: Change behavior of plugin so that it is bound to a single input field, rather than an empty form

Hey there,

I learned about this at this past SOTM and thought it was perfect for a small project I'm working on (https://github.com/louh/socrata-community-events/tree/gh-pages, demo at http://louhuang.com/socrata-community-events/) - it was way better than entering individual pieces of the address in separate input fields! However, I thought some of the functionality could be improved for my use, so I made some changes to my fork. This is a pull request for these changes in case you're interested in incorporating any of them.

Summary:

- Since I have multiple input fields in a single form, and you can't have nested forms, it's better to have the library functionality bound to a single input field rather than an entire form. Also, the original code as-is would have cleared my own form. So I modified the code to do this.
- This also means the library isn't inserting its own input field, so I removed the input CSS, and deprecated the `initialText` option (since that can be done in HTML with `placeholder`). The only thing it needs to do to modify the original input field is to make sure autocomplete is off.
- On the dropdown CSS I added a maximum height and a scroll, if the content is larger than the maximum height. (Theoretically this could be implemented in other ways, e.g. as an option so users can customize through code.)
- I also updated the demo page to reflect these changes so you can test it.

To do - if you like these changes and want to incorporate them, I can also help to update the documentation or work out any other issues that might occur.

Thanks for putting together this library!