I am using this module in my Drupal Commerce store. I need to be able to hide certain states, since I only ship to continental USA. I don't want to allow the option of Alaska and Hawaii for example.
Thank you!
Tom
I am using this module in my Drupal Commerce store. I need to be able to hide certain states, since I only ship to continental USA. I don't want to allow the option of Alaska and Hawaii for example.
Thank you!
Tom
Comments
Comment #1
rszrama commentedHey Tom, I don't see us adding this as a feature to this module directly. There isn't really a good place for us to support the filtering of available administrative areas like there is for available countries. Your best bet will be a simple form alter to remove the states you don't want to show when US is selected as a country.
Comment #2
mrP commentedRan across this in my search for a solution restricting states to the continental US. Based on @rszrama feedback, here is what I implemented to achieve this with Drupal Commerce:
Comment #3
nitheesh commentedThis can be achieved by hook_addressfield_administrative_areas_alter()
See my comment on https://www.drupal.org/project/addressfield/issues/1483628#comment-12716255