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

Created on 7 July 2015, over 9 years ago
Updated 14 August 2024, 3 months ago

Problem/Motivation

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.

Steps to reproduce

Go to any content type & Add telephone field
Go to manage form display
Click on the setting configuration of telephone field, you 'll find placeholder field visible but size configuration field missing

Current behaviour

Expected result

Proposed resolution

Remaining tasks

User interface changes

When you edit any content type & try to add add telephone field, you can able to add size of telephone field from manage form display and see the configured size in telephone field on node edit form

you can notice size attribute value displayed on the basis of configured

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
TelephoneΒ  β†’

Last updated 3 months ago

Created by

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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 1 year 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 1 year ago
    29,378 pass
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year 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 10 months ago
    Build Successful
  • First commit to issue fork.
  • Pipeline finished with Canceled
    3 months ago
    #251715
  • Pipeline finished with Failed
    3 months ago
    Total: 304s
    #251716
  • Pipeline finished with Failed
    3 months ago
    Total: 291s
    #251723
  • Pipeline finished with Failed
    3 months ago
    Total: 187s
    #251733
  • Pipeline finished with Success
    3 months ago
    Total: 580s
    #251745
  • Pipeline finished with Success
    3 months ago
    Total: 490s
    #251769
  • Assigned to pooja_sharma
  • Pipeline finished with Success
    3 months ago
    Total: 624s
    #251870
  • Status changed to Needs review 3 months 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 3 months 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
    3 months ago
    Total: 126s
    #253766
  • Pipeline finished with Failed
    3 months ago
    Total: 123s
    #253767
  • Pipeline finished with Canceled
    3 months ago
    Total: 88s
    #253777
  • Pipeline finished with Success
    3 months ago
    Total: 1091s
    #253778
  • Status changed to Needs review 3 months ago
  • I have tried to add upgrade path. Please review, moving NR.

  • Issue was unassigned.
  • Status changed to Needs work 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Left a comment on the MR.

  • Assigned to pooja_sharma
Production build 0.71.5 2024