Closed (fixed)
Project:
Address Field
Version:
7.x-1.x-dev
Component:
Address formats
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Jun 2012 at 04:10 UTC
Updated:
5 Dec 2014 at 16:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
johnpitcairn commentedAnd here's the patch...
Comment #2
vIQleS commentedSorry for being a noob, but what do I do with that?
And why can't it be changed in the UI somehow?
Comment #3
goldNathan,
It's a patch file. It's used to apply changes other people have made to their code to your code.
So;
The technical bits on how to do this is available here; http://drupal.org/patch/
Comment #4
johnpitcairn commentedIt can't be changed in the UI because there isn't a UI to do it. And there shouldn't be a UI, because the whole point of the addressfield module is that it automatically displays the correct address fields for each country. The address fields used for NZ are not correct, and this patch corrects that. If the patch is committed by the module maintainer, nobody will ever have to deal with this problem again.
Meanwhile, to fix it you need to patch the module. See the handbook page for applying patches: http://drupal.org/patch/apply
Comment #5
goldWhile New Zealand doesn't have states we do have regions so I would go for renaming this lable
While we have regions, from a postal address point of view they are not compulsory so making this field non-required would be the better way to go.
I was going to do this over the weekend. Shall add the patch here instead of on the issue I made.
Comment #6
goldI'll also roll the changes from http://drupal.org/node/1671508 (thanks dollar_dad) into this. He's taken the time to add the Regions and also pointed out that Zip aught to be Postal Code.
Comment #7
goldSo;
State -> Region (and optional)
Region gets list of regions
Zip becomes Postcode
Comment #8
johnpitcairn commentedSounds good. Predefined regions would be handy to have as an easy way to route submissions to relevant company branches.
Comment #9
goldThis patch makes the following changes;
Kudos to dollar_dad for the region list.
Comment #10
mjcarter commentedSweet, nice work, works well for me. I'm using this with the postcode field optional too
Comment #11
jonathan_hunt commentedWorks for me, though you may wish to reroll with fixed spelling:
+ // A few contries have a well-known list of administrative divisions or
should be
+ // A few countries have a well-known list of administrative divisions or
Comment #12
goldHeh... The spell checker in my editor didn't highlight that... :) Looking at the patch though I added to the existing comment. But yeah, fair enough. :)
Comment #13
wiifmPatch looks good to me, works as desired, and is a massive improvement for all people living in NZ.
Can this be committed?
Comment #14
babbage commentedThe defaults built into the module include a required field for "State" in New Zealand and there are no states in New Zealand. This is therefore a bug.
Comment #15
babbage commentedMore accurate title.
Comment #16
babbage commented[Form submission blip in my browser.]
Comment #17
snlnz commentedpatch in #12 works a treat thanks @Gold :)
EDIT: Though, wouldn't it make sense to rename CITY/Town to just Town and move the TOWN field to the right of the Region field? :)
Just a thought!
Comment #18
mjcarter commentedI think the postcode field should be optional by default.
If it's not required for a delivery to be sent out, it shouldn't be required in the form. A few countries do officially require a postcode for mail services but NZ is not one of them.
The reason this field should be optional, apart from postcodes serving little function in the NZ post system, is based on CRO - there is a correlation between the number of required fields and checkout abandonment rate, especially if fields are things that people may have forgotten or not know off-hand in certain circumstances - for example ordering as a gift to be delivered to a relative or friend.
I agree with #17 @snlnz (though "town/suburb" I would suggest as the label), if all NZ cities are in the regions list.
Comment #19
ericgsmith commentedAuckland appears to be missing from the last patch?
Comment #20
willieseabrook commentedYes Auckland was missing! Thanks @ericgsmith.
Regarding @mjcarter comment in #18 This makes post code not required.
Most people in NZ don't know their post codes, it's not like the US or CA where post code is golden. So I agree it shouldn't be required.
Comment #21
johnpitcairn commentedConsider the situation where you are not delivering a product, you are collecting address data that will later be used for a bulk postal mailout (with user opt-in of course). In that case, NZ Post does require a postcode. So that use-case definitely needs a required postcode field.
Comment #22
wiifmWhether people know their postcode or not is not the point here, the latest standard for sending letters in NZ clearly states that a postcode is always required (see http://www.nzpost.co.nz/sites/default/files/uploads/shared/address-stand... )
My advice would be to leave the postcode field as required (for the 90% use case where something would be sent to the address), and for the leave it to the 10% who require the address for other purposes to use a form_alter.
On that note, I am keen for #19 to be committed.
Thoughts?
Comment #23
willieseabrook commentedI say that people knowing or not knowing their postal code is critical for commerce sites - putting impediments to completing the checkout process will lead to cart abandonment and lost dollars.
In reality, courier companies don't *require* postal codes, and neither does NZ Post for mail delivery (yes they all state the requirement in specs but they will still deliver without one). Yes for bulk delivery NZ Post does require a postal code, but what percentage of use of address is for commerce sites, and what percentage is for collecting physical mail addresses for bulk postal deliveries?
At the same time, even though making it required will lead to cart abandonment, anyone using this for commerce sites can simply form alter and disable the requirement, or patch as I have done.
So I'm also in favor of #19 being committed.
I don't think this should block committing, as this is an urgent patch for regular users, but perhaps a required/not required checkbox in the field settings could be an option?
Comment #24
j0rd commentedThis is a duplicate of
#1829900: [meta] Address Field 2.x needs pluggable administrative areas and an actual API
If you think so to, please close your ticket.
Comment #25
mjcarter commentedI guess the ultimate fix would be storing compulsory value flags in the DB with a UI to adjust, if I hadn't installed this patch I probably wouldn't have had a clue where to look to change the setting (easy then though).
It's a good call about the addressfield having other uses than just commerce.
At the moment it seems like 3-2 on opinions of whether it should be compulsory or not.
I still stand by my opinion it should be optional, but am making the assumption that the majority of sites using this module are not doing so for bulk mailing purposes.
Comment #26
snlnz commentedI'd like to see the patch committed as is from #20 as it is a step in the right direction either way for NZers.
Comment #27
rszrama commentedPer j0rd's comment, perhaps when we have an improved DX around adjusting address formats, the question of whether or not the postal code should be required will be simpler to resolve. In the meantime, I'm going to commit #19 that leaves it as required since that appears to be the standard. In the interest of matching strings with the GB address formatting, I've switched "City/Town" to "Town/City".
Comment #29
bojanz commentedEveryone, please comment on #2387967: Remove New Zealand regions.