Skip to main content
Nintex Community Menu Bar
Solved

Display remaining Character Count on Memo Fields

  • December 28, 2018
  • 2 replies
  • 109 views
  • Translate

Forum|alt.badge.img+10

I had success in previous CMS tools where I could have a red character count shown to users after they started typing into a memo box of sorts.

Is there a way to display / show number of characters remaining in a textbox area?

 

If I set the max to 256 and it does a count down.

 

Thank you in advance!

Best answer by AAschenbrener

That was for word count which started pointing me down a path that did get me what I needed.

The key that I missed was having the Script / Datalabel in the same cell as the Text Area.  Not sure if this is efficient or the right way to go but it did work.

 

I ended up having 2 data labels

1:   Name:  CharacterScript -  Literal / Holds expression

<Script language = "Javascript"> $(document).ready(function () { var wrdCountDataLabel = $("[name='CCount']"); wrdCountDataLabel.parent().find('input[type=text], textarea').keydown(function () { console.log($(this).val().length); $("[name='CCount']").html((256 - $(this).val().length) +"/256"); }); }); </Script>


*** The bolded item is populated with my 2nd datalabel that holds the text for the count.

 

2:   Name:  CCount


I would now LOVE to get conditional styling setup on that field that if the content is 0/256 the text is green else it is red. But can't seem to get that to work.

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+16
  • 682 replies
  • December 29, 2018

Forum|alt.badge.img+10
  • Author
  • 112 replies
  • Answer
  • December 31, 2018

That was for word count which started pointing me down a path that did get me what I needed.

The key that I missed was having the Script / Datalabel in the same cell as the Text Area.  Not sure if this is efficient or the right way to go but it did work.

 

I ended up having 2 data labels

1:   Name:  CharacterScript -  Literal / Holds expression

<Script language = "Javascript"> $(document).ready(function () { var wrdCountDataLabel = $("[name='CCount']"); wrdCountDataLabel.parent().find('input[type=text], textarea').keydown(function () { console.log($(this).val().length); $("[name='CCount']").html((256 - $(this).val().length) +"/256"); }); }); </Script>


*** The bolded item is populated with my 2nd datalabel that holds the text for the count.

 

2:   Name:  CCount


I would now LOVE to get conditional styling setup on that field that if the content is 0/256 the text is green else it is red. But can't seem to get that to work.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings