Cannot set default country without setting default number

Created on 29 March 2023, about 1 year ago
Updated 20 July 2023, 11 months ago

Problem/Motivation

It is useful to set a default country for phone numbers, but not a default number.

Steps to reproduce

1. Add a phone number field to an entity type
2. Edit the field - under Default Value, select a country but don't enter a phone number
3. Save the form
4. Go back into the edit form - the default country is still USA

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom malcomio

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @malcomio
  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    I'm happy to review any provided MR's or patches.

  • Status changed to Postponed: needs info 11 months ago
  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    @malcomio To only set the country as default value, you should be doing this in the field formatter. Drupal core expects a real value when you want to use the default value on the field settings. I hope this helps?

  • Status changed to Closed: works as designed 11 months ago
  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    Going to close this as works as designed. Please feel free to reopen an issue when you feel like there is still a bug.

Production build 0.69.0 2024