Hi there,
Could we look to add more options under the google maps api, specially for autocomplete for addresses to allow you to output the individual address to other fields but to also output the postcode as well?
Hi there,
Could we look to add more options under the google maps api, specially for autocomplete for addresses to allow you to output the individual address to other fields but to also output the postcode as well?
Hi.
I literally just did this a week ago or so.
You can make use of ‘split’ formatter to get all this right now.
So, whatever the name of your autocomplete field is, it should have something called ‘address’ or ‘value’ as selected final address.
You can use that with split and the resultant array has specific parts of the address always at specific indexes.
Eg:
input_gac.value.split(',')[0] -> address
input_gac.value.split(',')[1] -> city
input_gac.value.split(',')[1] -> postcode & state
which you can further split by space to get them separately.
etc…
It would definitely be nicer to have it done by Wappler itself though.
P.S. You can vote for your own request too.