Problem/Motivation
Is it possible to output just the "City" "Postal Code" or "State" etc? I know this is just a textfield, but this module would serve as a superbly upgraded alternative for the Address Module if we could parse out the output into usable location values.
Issue fork google_place_autocomplete-3275578
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
geoanders commentedUsing this module: https://www.drupal.org/project/address_autocomplete and the address field, a custom plugin/provider could be built to populate the address fields, like city, postal code, etc...
I built out a custom plugin/provider on this module: https://www.drupal.org/project/geocode_earth_autocomplete, as an example.
Comment #5
danielwirz commentedHey there!
I stumbled across a very similar issue where I needed the lat & long coordinates as value for the field. I think, a nice solution for this would be to add an option for a custom format, using the places object given by the API.
I added a new
output_formatsetting to the field formatter. This way we can use JS template literals to format the resulting value as desired.What do you think, could that be a useful feature?