As per request in #1309524: Country selection reset to default in widget output, to make the default country code optional.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ckng’s picture

Status: Active » Needs review
FileSize
3.45 KB

Note: Somehow the D7 form api '#states' does not work here

ckng’s picture

Status: Needs review » Closed (fixed)

Working code committed.

adam_b’s picture

Was this committed to the 16 Feb dev version? I've tried it and it's still requiring a default country code.

adam_b’s picture

Found it in the 17 Feb release, thanks.

geerlingguy’s picture

Status: Closed (fixed) » Active

I'm now getting the following two errors every time someone saves a record with a phone cck field in it:

Notice: Undefined index: enable_default_country in cck_phone_phone_number_process() (line 728 of /path/to/sites/all/modules/cck_phone/cck_phone.module).
Notice: Undefined index: country_code_position in cck_phone_phone_number_process() (line 718 of /path/to/sites/all/modules/cck_phone/cck_phone.module).
ckng’s picture

Try re-saving the field (as in the content type, not the node).

geerlingguy’s picture

Is there an easy way to do this programmatically? For some interesting reasons, I have over 250 profile types on my site, and having to manually go in and re-save the field on each profile type would take a few hours.