Skip to main content
Nintex Community Menu Bar
Solved

Display remaining Character Count on Memo Fields

  • December 28, 2018
  • 2 replies
  • 138 views

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.

2 replies

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

Forum|alt.badge.img+10
  • Author
  • 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.