I've extended functionality so that you can put a soft limit on a text field or text area. With soft limit, I mean that it doesn't keep you from adding more characters in the field. This is configurable if you edit the field in the Field UI.

There's an indicator on the right of the field that is green by default. Once you're at 75% it turns yellow. At 100% it's red. After that it's still red but you can still type until you're at the "hard limit", if there is one.

This is a useful indicator if there are strict design guidelines, e.g. with short/medium titles in different blocks.

The attached images should be put in the 'images' folder. maxlength.css_.txt is to be renamed to maxlength.css and must be placed in the 'css' folder.

Comments

weri’s picture

cedewey’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

This is a duplicate of https://www.drupal.org/project/maxlength/issues/2329441

Since we're putting a feature freeze on the Drupal 7 version of the module we won't be adding this feature. However, the Drupal 8/9 version of Maxlength does offer a soft limit option.