Problem/Motivation

Leaving force truncate disabled should allow a user to type past the limit and the counter should go to negative, but it stops the user from typing past the limit.

Steps to reproduce

  • Enable the maxlength module
  • Go to the manage form display of the content type that has a long, plain text field on which you want to add maxlength limit
  • Find the gear icon next to the field
  • Set a maxlength limit and leave the force truncate disabled.
  • Create a content and add characters past the limit.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
maxlength-softlimit.mp49.08 MBhansa11

Comments

hansa11 created an issue. See original summary.

cedewey’s picture

Title: Soft limit doesn't allow user to type past the limit. » Soft limit doesn't allow user to type past the limit on plain text fields.
Issue summary: View changes

Thank for you finding and reporting this bug Hansa.

I've confirmed this is happening specifically on long plain text fields. For formatted text this bug is not present.

sabina.h’s picture

Hello, I believe this is a duplicate of this issue: #2916687.

cedewey’s picture

Thanks for pointing that out Sabina.

If we do decide to go with the solution outlined in that issue then this would be considered a duplicate. However, we may not go with that specific implementation. We Maxlength maintainers have a hack-a-thon planned this Friday so we'll try to come to a decision then.

Personally, I would prefer a solution with a simpler interface rather than introduce yet another setting to configure- a simple soft or hard limit radio button as proposed in #3259248: Improve the user experience of configuring a Maxlength limit.

We'd love your input on the best solution in that issue.

For now I'll mark these as related issues.

cedewey’s picture

cedewey’s picture

Title: Soft limit doesn't allow user to type past the limit on plain text fields. » Soft limit doesn't allow user to type past the limit on long plain text fields.
cedewey’s picture

Status: Active » Closed (duplicate)

After testing out the patches being written for #2916687: Soft limit does not work on plain text fields because the Maxlength HTML attribute is used this is indeed a duplicate of that issue. Closing this.