Word counter for text field in Acrobat DC form
Hi, I've been googling all over, and am having a heck of a time making this work.
I have a text field in an Acrobat form that needs to let the user know how many words they have entered.
My field to be counted is called "Statement" and the word counter field is called "WordCount'.
I was able to adat the follow javascript, which I put as a Custom Keystoke Script for "Statement":
var aWords = event.value.split(" ");
this.getField("WordCount").value =
aWords.length;
and it sort of works, however the WordCounter field does not get updated correctly.... it lags behind one or two words, and if a word is deleted and retyped, the counter gets behind even more. Even if the "Statement" is cleared completely (not reset, but just using the delete key), WordCounter shows 1.
It's so close... I just need WordCounter to be more accurate.
What am I doing wrong?
Any help would be greatly appreciated.
BTW, a lot of older discussions on the forum keep referring to https://forums.adobe.com/thread/1094129 which is a dead link (it just goes back to the main community page.) Any way of resurrecting that discussion?
