User inputs city name, provides a password, then has access

I have a data collection with information about 35 cities.
I want to allow one person from each city to edit the information for their city.
I want them to type the city name into an text input and type a password I provide into another.
Then I need to allow them to edit their city’s information.

How do I get the city (item) they type into the text input?
How do I set individual passwords for each city?

Hi,

Getting value from text input is sone using this ,
As for passwords per city.
See here a post about having your own authentication system. You probably need something less complicated, but this is a good place to start.

Liran.