I have a data xml file with a large number of zipcodes and city names that are correlated in the correct way.
I want to integrate a search into my contact form. When a user places his cursor in the field 'zipcode', a search box should appear and the user should be able to search for a zipcode of a city OR a city name itself (inside the same box). The reversed action should also be possible.
So when the user is typing names (in the field city or zipcode), the search dropdown should display the relevant data to his search. When the user places his cursor in the 'city' field. A search should be possible on zipcodes and city names. When the user selects the appropriate zipcode or city name (preferably displayed in the same line separated by a dash or so) the zipcode should be placed in the zipcode field and the city name in the city field.
How can I extend the default behavior of the search so that I can search through two columns and display the combined data in the search result box.
(PS: Yes I know, just split up the two searches... Not what I'm looking for though. PLIS NO HATE)