Problem/Motivation

If you have a text field with values longer than 128 they are truncated by the conditional fields UI.

Drupal defaults to text fields of length 255 when creating a new text field type but the default maxlength of text fields is 128. There is a issue discussing increasing it to 256 - https://www.drupal.org/project/drupal/issues/3331028

This means when trying to put in a value in a text field via Conditional Fields it won't let you input a field longer than 128.

Steps to reproduce

Create a text field with a length of 255 and then try to populate the value that Conditional Fields will put in there if it's longer than 128 characters it will be truncated.

Proposed resolution

This would be a simple fix of adding a line making the maxlength 255 in Conditionals.php around line 142 - this is kind of an edge case but since I ran into it I thought I'd document it. It seems like pulling the maxlength from the field defintion itself would be ideal but I'm not sure how that would be accomplished.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

robbt created an issue. See original summary.

benstallings made their first commit to this issue’s fork.

benstallings’s picture

Version: 4.0.0-alpha6 » 4.x-dev
Status: Active » Needs review