Browsing and Searching the forum, I found this thread which has helped a little, but it's already answered, and I have a separate but relatable problem, here's the old thread:
http://acrobatusers.com/forum/javascript/adding-character-count-two-fields-while-typing
From that thread, I copy and pasted the code, and was quite successful in getting the character count from two fields, here is what I added to my form in acrobat, from the 3rd post in the above thread:
Code:
//put in Custom Keystroke Script of the two "Name" fields to be counted
if(!event.willCommit)
{
var oName = this.getField("Name2"); //the other field to count (change accordingly)
var nDisplay = this.getField("CharCnt"); //to display the result
var nChars = event.selEnd - event.selStart;
var aFull = event.value.split("");
aFull.splice(event.selStart, nChars, event.change);
var strFull = aFull.join("");
nDisplay.value = strFull.length + oName.value.length;
}
I changed the field names to match my document, however, I would like to get the character count of five fields and add them while typing to a separate field. Again, the above works great for just two fields, but I need five.
Thanks for your help!
As the user types, the character count goes up. I can copy and paste the code if you have it, or tell me exactly what to add and where to the above.
THANKS!