I have a Canadian phone number field with the "Add the country code if not filled by the user" option selected. When a number without a country code is entered, the country code is prefixed to the field. But when a country code is provided, the country code is removed.
In format_ca_phone_number, a valid entered country code is never added to $phonenumber.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | keep_provided_ca_country_code-1915188-3.patch | 939 bytes | pbuyle |
Comments
Comment #1
pbuyle commentedThe attached patch preprend the country code extracted from the input. The country code is validated and will have to be 1 if provided. If the "_Add the country code if not filled by the user_", the country code is prepended only if not already provided.
Comment #2
pbuyle commentedA space is needed after the country code.
Comment #3
pbuyle commentedI should test my patch before hitting submit...
Comment #4
pbuyle commentedComment #5
drclaw commentedI can confirm that the patch performs as advertised. Thanks! :)