New Package - Char Limit
This is a very basic package, it’s just a new datatype, a textarea with a limit on the characters.
The character limit can be set on the edit datatype page (default this is set to 100).
In the content section it looks like this (these are 2 char limit properties):
So you get feedback on the amount of characters left when you are typing. If you exceed the limit the content gets trimmed.
Since umbraco v4 is just around the corner, this package is one for v4 (using the datalayer and it also works in liveediting mode).
The reason I created this datatype was to have a simple example to show how to create a datatype, so you can expect a blog post explaining the creation of a datatype soon…
Char Limit Package: download

Freaking cool Tim!
I know of at least one on the forum who can use this datatype…
/Dirk
Hey Tim can you drop me a line on how you’re building this restriction in, I want to see if this is supportable within the UIL validation checks I already have
Hi,
I having a trouble to use this control and I rely need it :-).
I’m using v 3.0.3 , is any way that I can use this also or you build this only for v4?
@lpastor, try downloading v4 and copying the umbrac.datalayer.dll into the bin folder of your v3 site.Doesn’t work
This is wicked tim! To restrict end users/clients with the ammount of copy in some places is great.
Great stuff, keep it up.
Warren
Hi
one stupid question…
How much trouble is to implement this in rich Text editor ?
Cool as always Tim.
Hi Tim
I tried to install the char limit package on my Umbraco server (V 4).
I expected that a new datatype would appear in the list but that did not happen, what can i be doing wrong ?
The package is listed under installed packages, and the installation seemed to run just as it should.
Thanks
Mikael
@Mikael, create a new datatype and select char limit as rendercontrol.
Cheers,
Tim
Yes now i see how it works, thanks a lot.
Mikael
Nice one! Just what I needed. I also tested it for existing content - if you have existing content for example a page summary as Textbox Multiple you can safely convert that to a Char Limited Textarea without it truncating any of your existing conetnt. If you then you start editing the existing content it will then automatically truncate it to the character limit you set.
This is a very cool package. It would be great if we could get it in a textstring (input type=”text” not textarea) field as well.
Love it, except that it does not seem to honor “Mandatory” setting when included in a document type (Umbraco 403) - save and publish is allowed when the limited field is empty, even when Mandatory is checked.