Fork me on GitHub

Geolocation with Text Inputs


This example illustrates that a select form is not necessary to fill a field. We've used a text input instead of a select for the state and country.


The demonstration activates on button click.

The Code

    <form data-ur-set="reverse-geocode">
      <a data-ur-reverse-geocode-component="rg-button">Click here to find your location</a>
      <input type="text" data-ur-reverse-geocode-component="rg-street">
      <input type="text" data-ur-reverse-geocode-component="rg-city">
      <input type="text" data-ur-reverse-geocode-component="rg-zip">
      <input type="text" data-ur-reverse-geocode-component="rg-state">
      <input type="text" data-ur-reverse-geocode-component="rg-country">

Back to Geolocation Widget