We have currently formatters for showing Latitude, Longtide and Static Maps, but we have not formatter for showing Address which entered by User.

How we can do this?

Comments

Toktik’s picture

Any ideas?

profak’s picture

Issue tags: +address display, +formatter

Well, i read all issues down here and only thing i see is to create another formatter and one more field in datase in order to store full text address.
This patch is kind of outdated.

I will try to implement formatter and let you know if i success.

Cheers!

profak’s picture

StatusFileSize
new30.24 KB
new11.42 KB

Hello!

I made simple formatter to output address as text ( and hyperlink to google at the same time ). It has absolutely same interface on node creation, but different output in node view.

Demo with theming could look like this (last field).

I'm not sure about my patching skills so i attach both patch against current dev version ( 5th of November ) and zipped module!

Hope that helps :)

Toktik’s picture

Your patch works! Thank you!

matthew gibbon’s picture

Will this patch make it into a release

vlad.dancer’s picture

Title: Address formatter » Issue status

The thing is currently I've (and many other) added this feature by new field + form_alter to store text that user enters. So it will be good to save such data. I agree with #5 matt1. How is current status of this feature, will be included this feature in next version?

derjochenmeyer’s picture

Title: Issue status » Store and output Address

Please don't change the name of this issue to nonsense :)

I will look into this issue, you guys might be interested in this
#1780092: Introduce new 'data'-column to store whatever comes back from Google's Geocoder

matthew gibbon’s picture

Thank you for the refered link. I am a Drupal UI user with minimal code knowledge. Hence my request as a feature.

My current use. Patched module above works great so far for address formatted. I then added a view Eva of the map below it. I support the idea of storing the reversed address, the user can the have the option or not of displaying it with for matters.

How stable is the above patched. I assume that I should not do automatic update on this module?

I look foward to an outcome decision on wether this will be a display formatter feature in further versions.

Funksmaname’s picture

A simple additional display formatter would be much appreciated... alas patch #3 didn't work for me.

Funksmaname’s picture

As a workaround, I put in the following jQuery solution:

jQuery(document).ready(function($) {
    $('#edit-submit').bind('click', function(){
        $('#edit-field-address-as-text-und-0-value').val($('#edit-field-geolocation-und-0-address-field').val());
    });
});

where the first # is the text field which is hidden with css (hide the field wrapper, not the field) and the second is the goelocation address field which isn't stored anywhere. When the form is submitted, the text is copied from one field to the other and then therefore saved in the db and can be included in views etc.

#field-address-as-text-add-more-wrapper {display:none}

Hope this helps, while a more robust address storage method is agreed upon.

derjochenmeyer’s picture

mtoscano’s picture

I tried to use the solution at #10, adding the code to the geolocation.js in the geolocation folder, modifying the field name to match mine and clearing cache, but it doesn't works.
Should I put that jQuery code in geolocation.js?

nitrocad’s picture

I know it's not a nice solution, but with computed fields you can store the whole address. I know its not good for views search, etc. but only for display good enough.