Steps to reproduce:
1. Select Country: USA
2. Select State (administrative_area): Alabama (example)
3. Change Country: UK

Result:
administrative_area becomes textfield County. Old option value AL (Alabama) is saved.

I think right solution is to clear administrative_area after changing Country.

Comments

bojanz’s picture

Title: Selected State for US is displayed in County field after changing country from US to UK. » Clear country specific fields when changing the country
Status: Needs work » Active

There's no patch here, "needs work" is the wrong status.
I've seen the same behavior, and agree that we should clear administrative_area on country change.\

Question is, how far do we want to go with field clearing?
Here are other candidates: locality, dependent_locality, postal_code.
Might make sense to clear all of them. Some countries have dropdowns for locality and dependent_locality too, and different rules for validating postal codes.

bojanz’s picture

Category: Bug report » Task
bojanz’s picture

Status: Active » Fixed

Talked with Ryan, he agrees, committed a fix.

  • bojanz committed a4852b5 on 7.x-1.x
    Issue #2159251: Clear country specific fields when changing the country
    

Status: Fixed » Closed (fixed)

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