1. athco
  2. General
  3. Thursday, July 04 2019, 08:05 AM
Ηι,

I use only one field for address (e.g. 1600 Pennsylvania Ave NW, Washington, DC20500, U.S.A.).
Which is the easiest way to split it in "address", "area", "zip", "country", etc. in the background?
That is, once user fills one field, the rest are filled automatically. Is it possible through EP?

Thank you in advance.

Best regards,
Athco
Accepted Answer
admin Accepted Answer
Admin
Hi,
this is not possible natively but there are some workaround and alternatives:
Workarounds:
1) Fill splitted values in other fields with Javascript, read here https://www.easy-profile.com/support/return-google-placesid.html, at this link you will see example for "place_id", but you can do the same to retrieve other informations like street_address, country administrative_area_level_1, administrative_area_level_2, administrative_area_level_3, postal_code, post_box street_number...
2) Fill values by creating a plugin that after store address get details from Google Map API. This method is a bit complex and require many PHP, Joomla Dev, and Google APIs knowledges

Alternative:
Instead using only one field to fill address you can use many other fields. Google Map field allow you to retrieve geo coordinates from other fields. For example you can create following text fields "address", "area", "zip", "country" and use option to get address from these fields (see screenshot)
Attachments (1)
  1. more than a month ago
  2. General
  3. # Permalink


There are no replies made for this post yet.
However, you are not allowed to reply to this post.