count amount of enters in a multiline field
Hi,
I have created a code to find whether a new line has been created in a multiline text field which is working well. Although what i really want to do is to count how many a new line has actually been input. For the life of me i cant quite figure it out.
I am pretty good with javascript, but the calculation logic for counting the quantity of a specific thing in a field is a bit above my head. Any help would be appreciated.
The example below is script that i have started building, but i cant get it to work. There are no errors in the JS console but the field i put this calculation in only says "undefined"
var ENT = this.getField("multiline test").value.toString().search("\r")!=-1;
for (var i=0; i < ENT; i++){
event.target.value = ENT.value;
}
