AddressField issue queue
Help in chnaging addressfield based on external input
I have a country field in my form. When this is set, I'd also like to update the addressfield with teh correct country value and settings. Using jquery it's easy to set the country, but this obviosuly dioesn;t trigger the addressfield rebuild. Any idea what I can do?
[The use case is where people are entering branches in countries, but where the address may be in another country, so the country and address dropdowns need to be separate e.g. the Irish branch has a GB address. However, for 99% of countries, country and address country will be the same, so to save hassle, I'd like to set the latter automatically when the former is set]
I've got:
'callback' => 'my_callback',
'wrapper' => $format['#wrapper_id'],
'method' => 'replace',
);
so my_callback is fired when the country is changed, but what should it do to trigger a rebuild of the addressfield with the new country value?
Customizing Addressfield in User Registration
Hey all!
Is there a way to only set certain fields from Addressfield to appear on the User registration page? For example, I'd like to add First/Last Name (and make those required to register) and Organization fields (not required to register) to the registration page, but not the Address/City/State/Country fields.
Thanks! :)
Argentina provinces
If you are from Argentina, here is the code to add at "address.inc" file.
ISO 3166-2
$format['locality_block']['administrative_area']['#options'] = array(
'' => t('-Seleccione una opción-'),
'AR-B' => t('Buenos Aires'),
'AR-K' => t('Catamarca'),
'AR-H' => t('Chaco'),
'AR-U' => t('Chubut'),
'AR-X' => t('Córdoba'),
'AR-W' => t('Corrientes'),
'AR-E' => t('Entre Ríos'),
'AR-P' => t('Formosa'),
'AR-Y' => t('Jujuy'),
'AR-L' => t('La Pampa'),
'AR-F' => t('La Rioja'),
'AR-M' => t('Mendoza'),
'AR-N => t('Misiones'),
'AR-Q' => t('Neuquén'),
'AR-R' => t('Río Negro'),
'AR-A' => t('Salta'),
'AR-J' => t('San Juan'),
'AR-D' => t('San Luis'),
'AR-Z' => t('Santa Cruz'),
'AR-S' => t('Santa Fe'),
'AR-G' => t('Santiago del Estero'),
'AR-V' => t('Tierra del Fuego, Antártida e Islas del Atlántico Sur'),
'AR-T' => t('Tucumán'),
);
$format['locality_block']['administrative_area']['#title'] = t('Provincia');
}
Sub Premise copy paste error??
Sub Premise is missing and not implemented correctly.
See attached patch to follow.
Country Curaçao should not have a postal code
Hi,
In Curaçao addresses do not have postal codes, only Street Name and City. This counts for Aruba & St. Maarten as well. I don't know where in the plugin this code is located, I will be looking into it to tell you exactly where it is that needs changing.
Display option
It would be great to have more display options for this field, for example, I would like to display country name and icon in views module or in some content type page.
AJAX Error
When changing the country dropdown list I receive the following error:
"An error occurred while attempting to process /system/ajax: this._each is not a function"
How do I import via Feeds?
I've read through this post: #1023068: Feeds mapper for Address Field, but I can't seem to figure out how to import a CSV file with the Feeds module.
I have a CSV with: title, address1, address2, city, state, zip.
I don't even seem to know where to begin, so any help is appreciated. Thanks!
Australian Address Fields
Good evening from Eudlo Australia. I am looking for assistance to have the address field module have a fixed list of towns and corresponding postodes that I can add. I am not a coder and and looking for something in the User Interface like turning a filed into a list etc. The reason I am doing this is that the web site I am building has a limited delivery area by town/suburb which will be linked to the shipping module in drupal commerce (ie shipping rate matches suburb). Any assistance is much appreciated. Have a safe day. Cheers Ian G
Provide regular theme function for displaying an address as an alternative to formatter plugins
The formatter plugin system is powerful but impenetrable for front-end (and many back-end) developers. For use cases involving storing addresses from a single country or certain select countries, it's overkill to have to create a module and implement a custom ctools plugin.
One way to address this would be to provide an alternate field formatter that implements a theme function, which can then be overridden conventionally in modules and themes.
How to display administrative area by code rather than name?
I'd like to display administrative areas (eg US states or Canadian provinces) by their two-letter code rather than their full name. I know the code is used as the key in the module - is there a way to use it for the display?
Postal Code field missing when country selection is reduced to a few countries
Hi,
I just had a little look through adress.inc and fount out that there is something of a postal code field - but it does not appear in my cart. I am not a programmer so how do i get the postal code field?
Best,
Tobias
Is this $form_state value correct? user|user|field_address|und|0
I'm using addressfield on the user profile page without any problems, great module!!!
On the registration I'm requiring the country to be selected, city, state and zip are optional.
When I looked into the $form_state array to get to the country value I found this array:
Array(
[user|user|field_address|und|0] => Array
(
[thoroughfare] =>
[premise] =>
[locality] => my city
[administrative_area] => CA
[postal_code] => 99999
[country] => US
)
)
[user|user|field_address|und|0] doesn't look right to me. Is this a bug?
Thanks
UWE
Non-breaking spaces in plugins
It took me a while to figure out, but it seems that address.inc and name-full.inc use a type of non-breaking space in their prefixes.
Because of this, word cannot wrap between say a City and a State. Suppose you have a City 'New York' and a State 'New York'. This will be formatted as:
'New York New York'. Mention the double space. This is normally only possible with , but in the source code one only sees a space. So you cannot see it, but replacing the current space with a default space fixes the problem.
Patch attached.
AttachmentSize patch-fixed-spaces.patch1.36 KBSetting default country based upon GeoIP lookup
In my commerce store, I would like to populate the country field with a preselected global address filter (which is determined by GEOIP).
Will a form alter do the trick? Any guidance is appreciated.
Issue with addressfield in multiple value field collection combined with File fields
I have a very specific situation where I run into problems with the Addressfield field that I need help with.
I have a node type that holds several fields (a.o. file/image fields) and one field collection that is set up as a multiple field. Within the field collection there is an addressfield field and some other textfields.
The issue is that when on the node edit form a user edits one or more of the file/image fields, on submit, the edit form is reloaded without any message whatsoever (not on screen, not in de log and not in the apache log).
It took me a long time (eventually by eliminating every possible cause) to figure out that it is the field_collection "multiple value" setup combined with the addressfield field that causes this behavior.
Specifically the next lines of code in the addressfield.module file creates the effect of the form reloading wihout any message:
function addressfield_standard_country_validate($element, &$form_state) {// If the country was changed, rebuild the form.
if ($element['#default_value'] != $element['#value']) {
$form_state['rebuild'] = TRUE;
}
Somehow when a users changes a file field (which triggers the form to be rebuild) the $form_state['addressfield'] that is used in the addressfield_field_widget_form() is no longer filled with whatever was filled in before which causes comparison of the #default value and the #value to return TRUE.>
Commenting out the above code fixes the problem, so I was wondering what this piece of code is in there for?
Do we have acentral repository from where one can download addresses for countries?ex:Canda.patch
Do we have a central repository from where one can download addresses for countries?
One may not want all and some one may want some, accordingly they can download and install
ex:canada.patch, china.patch
Ajax errors
I'm going through a long list of nodes with incorrect addresses and correcting them. I'm getting irregular Ajax errors:
- sometimes when I select "United States" as a country, the states pull-down doesn't appear
- sometimes when I try and save the node, it refreshes to the edit form and there's an Ajax warning in the log: Invalid form POST data.
Any suggestions please?
Issue with danish translation
Some fields are missing in the .po file. However I can see that source looks correct, but the fields are missing from the .po file.
"Address 2" is present but "Address 1" is missing in the .po file.
To solve this the .po file should be updated with missing fields. Just tell me how to do it - I will gladly help :-)
Best Thomas
AttachmentSize issueTrac.zip524.95 KBAddressfield export problem
There is an issue I found over at the Views Data Export module forums that I believe may be an Addressfield issue: the inability for Addressfield information to be successfully exported within an otherwise successful Views export. The issue is here: http://drupal.org/node/1437022