Symptom: the phone field has no dialing code dropdown (+33, +39, etc.). A dropdown is expected to choose the dialing code.
Affected versions: 1.0.0.
Cause
The cartridge does not provide a dialing code selector. It reads the country selected in the form (the _country field) and sends the phone number to the DQE TEL service with:
Tel: the value entered, with spaces removed;Pays: the form country converted to a 3-letter ISO code, using the country mapping included in the cartridge.
If a country is missing from this mapping, the 2-letter code is sent unchanged, and the result of the validation for that country may not be reliable.
Solution
The selector must be built on the client side, in your site's theme: the cartridge does not provide it. Third-party libraries exist for this need, such as intl-tel-input. They are not provided or recommended by DQE.
Points to handle during development:
- Keep the
_countryfield in sync with the selector, because the cartridge reads this field to determine the country. - Send DQE a number whose format matches the country. The response format is set by the site preference
dqePhoneResponsePhoneFormat. If DQE returns a formatted number, it replaces the value of the field. - Check that every country offered in the selector is supported by the cartridge's country mapping. If one is missing, contact DQE support.
Verification
- Choose a country in the form and enter a number: in Business Manager, check in the
dqe-phonelog thatPaysmatches the chosen country. - Repeat for each country offered in your selector.
Related to