ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

A way to detect how many characters in a field?

July 02, 2012 10:25am

Subscribe [2]
  • #1 / Jul 02, 2012 10:25am

    gmatoso

    5 posts

    Does anyone know if there’s an add-on that would allow the template to check the field it’s about to display to see how many characters are in there? So I could check the count and display it slightly differently if there’s a lot of characters vs a few?

  • #2 / Jul 02, 2012 10:27am

    gmatoso

    5 posts

    If not, I might just have to program a little script on the front end with javascript to add a set of classes. Maybe that wouldn’t be SO bad.

  • #3 / Jul 06, 2012 7:21am

    e-man

    1816 posts

    CE_string has word-count and strlen functions - check it out, it may be helpful:
    http://www.causingeffect.com/software/expressionengine/ce-string/user-guide/native_methods

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases