Telephone field does not support setting a custom size of the input field

Created on 7 July 2015, about 10 years ago
Updated 5 May 2023, over 2 years ago

The size (a.k.a. width or length) of other textfields can be controlled with a field setting, but telephone doesn't have this option... I request adding it.

I know you can do this with CSS, but often the node edit forms are displayed using the admin theme which makes it harder to add CSS to customize them.

πŸ“Œ Task
Status

Needs work

Version

10.1 ✨

Component
TelephoneΒ  β†’

Last updated 15 days ago

Created by

πŸ‡¦πŸ‡ΊAustralia BWPanda

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia purencool

    Applied changes in comment #78 to the 10.1.x branch of Drupal and then added the remarks made in #81.

     ../vendor/bin/phpunit modules/telephone/tests/*
    PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
    
    Testing /app/build/core/modules/telephone/tests/src
    .............                                                     13 / 13 (100%)
    
    Time: 02:18.388, Memory: 10.00 MB
    
    OK (13 tests, 133 assertions)
    
  • last update over 2 years ago
    29,377 pass, 1 fail
  • πŸ‡¦πŸ‡ΊAustralia purencool

    Applied changes in comment #78 to the 10.1.x branch of Drupal and then added the remarks made in #81. Also included updated tests for Drupal 6 phone field widget migration.

     ../vendor/bin/phpunit ./modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
    PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
    
    Testing Drupal\Tests\field\Kernel\Migrate\d6\MigrateFieldWidgetSettingsTest
    .                                                                   1 / 1 (100%)
    
    Time: 00:14.362, Memory: 10.00 MB
    
    OK (1 test, 42 assertions)
    
     ../vendor/bin/phpunit modules/telephone/tests/*
    PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
    
    Testing /app/build/core/modules/telephone/tests/src
    .............                                                     13 / 13 (100%)
    
    Time: 02:20.311, Memory: 10.00 MB
    
    OK (13 tests, 133 assertions)
    
  • last update over 2 years ago
    29,378 pass
  • Status changed to Needs review over 2 years ago
  • Status changed to Needs work over 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Issue summary can be updated to include the default issue default.

    Also this will need an upgrade path as it is adding a new config setting to existing fields. Upgrade path should have a simple test case also.

    Thanks.

  • πŸ‡ΊπŸ‡ΈUnited States tim.plunkett Philadelphia

    Added the template to the issue summary, still needs filling in

  • Assigned to purencool
  • Issue was unassigned.
  • last update over 1 year ago
    Build Successful
  • First commit to issue fork.
  • Pipeline finished with Canceled
    about 1 year ago
    #251715
  • Pipeline finished with Failed
    about 1 year ago
    Total: 304s
    #251716
  • Pipeline finished with Failed
    about 1 year ago
    Total: 291s
    #251723
  • Pipeline finished with Failed
    about 1 year ago
    Total: 187s
    #251733
  • Pipeline finished with Success
    about 1 year ago
    Total: 580s
    #251745
  • Pipeline finished with Success
    about 1 year ago
    Total: 490s
    #251769
  • Assigned to pooja_sharma
  • Pipeline finished with Success
    about 1 year ago
    Total: 624s
    #251870
  • Status changed to Needs review about 1 year ago
  • Added MR along with other required changes to cover test coverage & updated IS as well, tried to check whether upgrade path needed or not, to verify followed following steps :

    1. Enabled the telephone module, added telephone field in content type, content add with telephone field
    2. Then added MR changes, test following scenario:
    - Go to the manage form display of content type in which existing telephone field added , try to save the field & manage form display:
    no config error display

    - Added new field in which size of telephone field visible & configure it, which is working fine when add node
    So what I concluded here upgrade path not required or either I 'm missing something

    In the existing TelephoneFieldTest added newly added size attribute test code , not sure need confirmation do we need still separate test coverage or this 'll be fine?

    PLease review, moving to NR

  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Upgrade path still stands. There's a new config key being introduced that existing sites won't have.

  • Thanks for swift response, I have quickly verify from config sync, got your concerns, there is new config key missing from entity form display, can you please suggest any core files that I can refer for upgrade path (to follow standard)

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    View may be good resource. Or image

    Will have to be done on using batch api as some sites could have many fields to check.

  • Pipeline finished with Canceled
    about 1 year ago
    Total: 126s
    #253766
  • Pipeline finished with Failed
    about 1 year ago
    Total: 123s
    #253767
  • Pipeline finished with Canceled
    about 1 year ago
    Total: 88s
    #253777
  • Pipeline finished with Success
    about 1 year ago
    Total: 1091s
    #253778
  • Status changed to Needs review about 1 year ago
  • I have tried to add upgrade path. Please review, moving NR.

  • Issue was unassigned.
  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Left a comment on the MR.

  • Assigned to pooja_sharma
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Totally agree that this is missing in the field widgets and just found that it's missing on many of them, also for example on integer & decimal inputs, so I created a generic parent task: πŸ› Field widget "size" setting is not available across all field types Active

    Maybe we should consider adding this in a base class or trait?

Production build 0.71.5 2024