[SOLVED] Forms - Lookup field with automatically update other fields

Hello Developers!

I have a Form [Clients]. Each Client have address inputs like “City, County, State”. I also have a DB table “Cities” with columns:


id  | City | County | State

when I write any City in autocomplete input “City” would like to have list of Cities, but with additional information: City > County > State - users will be sure, that they are choosing correct City.

And then, when user will choose City from autocomplete list, other informations from that choose have to bee automatically propagated to other fields at form like “City, County, State” and user can “Save” those information

How to do it ?
How to meat this functionality in the simplest way?
Thank for answers!

Make an Ajax event <yourField> / onChange, select the details and put there in your other fields.

Thanks. Works.