Cannot set default country without setting default number

Created on 29 March 2023, over 1 year ago
Updated 20 July 2023, over 1 year 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 over 1 year 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 over 1 year 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.71.5 2024