Replies: 7 comments
-
Was just thinking about this the other day. Would be really handy for things like SERP meta descriptions and read more/entry excerpts where you want users to stay around a certain range. It would also be handy to set a minimum and hard limit in addition so basically someone would need to enter at least X characters and then the limiter would indicate that "hey you're going over the limit, it's OK but watch it punk..." and then impose the hard limit sometime after. |
Beta Was this translation helpful? Give feedback.
-
Can this please be considered for Craft 4? |
Beta Was this translation helpful? Give feedback.
-
Would like this for a use case where listing summaries are truncated after X characters. In this case, all it would need to be is a "Soft limit" checkbox option so that the admin had the visual indicator that they were over the limit, but could still save the entry. |
Beta Was this translation helpful? Give feedback.
-
It's rare that anyone is going to want an exact number of characters and unlikely that anyone writing 'naturally' is going to finish up at that exact mark. In almost all of the use cases I've seen (metatags, image captions, summary text, etc.) a few characters in either direction doesn't make a difference and forcing editors to go back and excise content can lead to a stilted result and grouchy writers. There are many other ways to prevent layouts breaking via truncation or CSS. Form fields, now that's a different story. It would great to have this as a soft limit, maybe add a red border at the limit or pop something up but still allow the edit to go through. |
Beta Was this translation helpful? Give feedback.
-
That's pretty nice idea. And i don't think it would be hard to implement too, just edit field widget code a bit. |
Beta Was this translation helpful? Give feedback.
-
Maybe for Craft 6? |
Beta Was this translation helpful? Give feedback.
-
I had a similar idea here #15633 They added the ability to add a tip or warning. It would be cool if you could trigger these based on a condition, similar to how you handle validation in Sanity. |
Beta Was this translation helpful? Give feedback.
-
It would be great to give clients a "Soft Limit" on how much text content they can add to a field.
Sometimes a page design will degrade if too much copy is added to a section.
A soft limit on text fields would show clients they are nearing the ideal length of text, without explicitly preventing them from writing the last few words of their content.
Beta Was this translation helpful? Give feedback.
All reactions