to reproduce:

* create a new node with a location property where at least country and province input are enabled
* select a country and enter an invalid province
* submit form
* form errors should be set indicating an invalid province; go to that field and attempt to enter a correct province

note: the autocomplete functionality does not work.

Comments

yesct’s picture

Status: Active » Postponed (maintainer needs more info)

Please check to see if this is still a problem in the new release. If it is, reply with a new summary and set the status back to active.

alieffring’s picture

Status: Postponed (maintainer needs more info) » Active

The problem is that the province autocomplete only gets "twiddled" when the country select gets changed, but if you submit the form with an error the change() event doesn't fire and the autocomplete is looking for US states instead of provinces in the proper country.

Adding the following line to the end of the Drupal.behaviors.location function in location_autocomplete.js fixes it:

$('select.location_auto_country.location-processed', context).change();
alieffring’s picture

Turns out the fix isn't that simple; just invoking the change() hook will empty out any default value in the autocomplete field.

legolasbo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing old D6 issues as D6 is end of life