JQuery autocomplete with key-value pairs

November 5, 2011 by Roel Veldhuizen

Obviously, every client want autocompletion because Google has it. JQuery luckily makes our lives a bit more bearable by provide us a JQuery autocompletion plug-in. The problem, however, with this plug-in is that it will either show the value or the key if your lookup returns key-value pairs. The ultimate problem with this is that when you use this information to store in a database you will either get a database error because the value is not a valid key or you have to show the key as the value to your users. Our current solution is to add a hidden field which holds the valid key value.

About Roel Veldhuizen
Roel has a broad interest in business and IT-related subjects. In his bachelor, he focused on computer programming and embed software development. In this way, he became familiar a broad set of programming languages and techniques like Java, C, C#, C++, Php, web services and so on. After finishing his bachelor, Roel wanted to focus more on the business side of the IT and started studying business informatics. During his master study, he started a company, Paston, specialized in open source business application around Business Process Management.


Leave a Reply

Your email address will not be published. Required fields are marked *