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.

Command icon 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

chucksimply created an issue.

geoanders’s picture

Using 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.

danielwirz made their first commit to this issue’s fork.

danielwirz’s picture

Hey 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_format setting 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?