Since #968112: Allow addressfield to be optional, address fields can be made optional by checking the box labelled "Make all fields optional (Not recommended)". I think the "not recommended" part is the wrong way to help site builders make a choice.

A lot of work going into the Address Field module is inspired by commerce sites. From a commerce perspective, I understand that it's not recommended to make address fields optional, because incomplete data makes it really hard to ship orders. It's important though to realize that commerce it not the only use case for addressfield.

There are other use cases where optional fields completely make sense. This can happen if the location information you are collecting varies in precision (sometimes you know exactly where, other times you only know it roughly) or if the information applies to a geographic area which is sometimes small, other times large.

IMHO it's not the module's job to advise if the "make all fields optional" option is recommended or not. It completely depends on the use case. Even if it would not be recommended in the majority of use cases, I think it's better to explain the implications and let the site builder decide.

I'm not even sure why this option is not recommended, but I guess it has to to with validation. If that's correct, it would be better to change the label to something like "Make all fields optional (Disables validation - may lead to incomplete data)".

Comments

bojanz’s picture

Yes, it has to do with validation, and nothing to do with Commerce.
Each country defines rules on what makes a postal address complete.
By checking that option, you allow an incomplete address to be saved, making it potentially unusable.
"may lead to incomplete data" sounds a bit too mild. We need a better way of communicating "only do this if your postal address will never be used for postal purposes".

marcvangend’s picture

If you say "only do this if your postal address will never be used for postal purposes" you're already making assumptions about how the module will be used. Of course it would be a very bad idea to feed optional addresses directly into an automated system that assumes complete data. However the validation of possibly-incomplete data may just as well happen in another system, or manually.

Instead of telling the site builder what he/she should or should not do, I think the label should only reflect what the Address Field module can or cannot guarantee.

bojanz’s picture

"Address Field defines a new field type to store international postal addresses" - from the project page.
This module has always been about postal addresses, it's the assumption from day #1.
It's also the majority use case.

I'm fine with tweaking the wording, just as I was fine with introducing the option in the first place, just wanted to clarify this.

marcvangend’s picture

OK, I understand. You obviously know the module's user base better than I do, so I will happily follow the direction you, as module maintainer, choose.

So how about these options?
"Make all fields optional (No validation - data may not be usable for postal purposes)"
or, stronger:
"Make all fields optional (No validation - not recommended for postal purposes)"
or even stronger:
"Make all fields optional (No validation - unsuitable for postal purposes)"

Compared to the current label, I think each of these variants communicates much clearer what to expect.

  • bojanz committed 34291a9 on 7.x-1.x authored by marcvangend
    Issue #2479205 by marcvangend: Remove "not recommended" from "make all...
bojanz’s picture

Status: Active » Fixed

I went with "Make all fields optional (No validation - unsuitable for postal purposes)''.
In 2.x (the address module) I'll go with "Disable postal validation" since that module will have more than just the required fields check (postal code validation, etc).

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.