Problem/Motivation

When using textfield set to Unlimited (or more than one) values I cannot changed the field size in Manage Form Display. Changed from 60 to any size more or less does nothing to the field.

Steps to reproduce

Add a text field (any type) to any content and set the allowed values to anything other than one (1). Go to Manage Form Display and change the field size to any number and you'll see that it has no affect on the field.

Proposed resolution

I may have a solution, but I'm not completely convinced this is a true bug or something causing it on my end, and I don't know if the solution is sound. However, when I remove this CSS from core/theme/Claro/css/components/tables.css everything works fine and doesn't seem to have a negative impact. It doesn't even affect Paragraphs which is table based with these same CSS elements below.

Line: 214
Delete: td > .form-item > .form-element,

<del>td > .form-item > .form-element,</del>
td > .ajax-new-content > .form-item > .form-element,
td > .form-item > .claro-autocomplete,
td > .form-item > .claro-autocomplete > .form-element,
td > .ajax-new-content > .form-item > .claro-autocomplete,
td > .ajax-new-content > .form-item > .claro-autocomplete > .form-element {
  width: 100%;
}

The solution I'm temporarily using is my own custom CSS below. With this the fields can be resized normally.

td > .form-item > .form-element {
  width: auto;
}

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

Comments

System Lord created an issue. See original summary.

System Lord’s picture

Title: Form textfield size does not adjust with multiple allowed values » Form textfield size cannot be adjusted when multiple allowed values are used
quietone’s picture

Version: 10.2.x-dev » 11.x-dev

Fixes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies. Also, 10.2 is in security mode now.

ahsannazir’s picture

@SystemLord Can you please add Screenshot or screen recording to help identify the issue

prashant.c’s picture

I don't believe this is a problem. When multi-valued text fields are allowed, they come with a "Remove" button and a draggable icon. For a better editorial experience, these elements should be displayed in a single row.

nayana_mvr’s picture

Actually the temporary solution which is mentioned in the ticket has been implemented as part of another ticket which is in RTBC now. Attaching that ticket here. Maybe that will solve both the issues.

niranjan_panem’s picture

Checked the text-field re-sizing, working as expected below is the screen shot of it.

Before
screenshot of before update

After
Screenshot of after update

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Active » Postponed

The Claro theme was approved for removal in #3576460: [policy, no patch] Deprecate and remove Claro.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3576668: [meta] Tasks to deprecate Claro and the removal work in #3584638: [meta] Tasks to remove the Claro theme.

smustgrave’s picture

Project: Drupal core » Claro
Version: main » 3.0.x-dev
Component: Claro theme » Code
Status: Postponed » Active

Claro has moved to contrib