Forum Discussion

9 Replies

  • Here's a native QuickBase version that counts the characters - but note that it will not update until you leave the focus from the multi-line text field.

    Fields:

    - [Text] - multi-line text field, with "Max Characters" = 500

    - [Characters Remaining] - Formula Numeric field, with the following formula

    500 - Length([Text])

    (you can change 500 to whatever your maximum length should be - matching the setting in the field properties of [Text])

    [Characters Remaining] will start with "500". Once you type something in [Text], and you leave the focus of that field (e.g. by tabbing to the next field, clicking somewhere else, etc.) - then [Characters Remaining] will update to show the number of characters remaining after subtracting from the maximum character limit.
  • Can you do this so that it updates as people are typing instead of having them click outside the field to see how many characters they have left?
  • I'm a beginner app builder, so I have no clue how to do the above.  Was looking for simple solution, but I can't seem to find one.  Thank you.
  • It is simple. Just change the "6" to the fid you are trying to count the characters of and paste this code into a new Rich Text Formula Field:
    "<span id=QBU_Message></span>" &
    "<img src onerror='
      $('#_fid_6').on('keyup', function() {
        var message = (50 - $(this).val().length) + ' characters remaining';
        QBU_Message.innerHTML = message;
      });
    '>"
    On the form place this new field atop the field you are counting the characters of so it will not be obscured by the field completion menu that may popup.
  • Wow, thank you!  I was making this very complicated in my head.  I tried it and it worked.  It's the first time I use one of your solutions.  Thank you very much Dan!
    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      Now you got bragging rights and can strut around the office proclaiming your mad skills and get a raise for your good work.
    • JavierMartinez's avatar
      JavierMartinez
      Qrew Cadet
      LOL!  Give credit where credit is due. :-)  I wouldn't take credit for your hard work.
    • JavierMartinez's avatar
      JavierMartinez
      Qrew Cadet
      Dan, quick question.  Why does it only work with a certain browser?  I made the changes in Chrome, so if someone uses IE, it doesn't give them the character count.