8 Replies
Matthew Bibby

Yes, JavaScript can be used to check how many characters have been typed in a text entry field. Something like this should do the trick:

var player = GetPlayer();
var length = player.GetVar("TextEntry").length;

Here is a demo that shows the above in action.

And here is the SL360 file used to create that demo.

Unfortunately, due to Storyline limitations, the text isn't stored until after the user clicks away from the text entry field, which means we can't simply enable the next button when the minimum number of characters have been reached. 

So that's annoying.

Thankfully there are ways to work around this. 

See here if publishing to HTML5, or here if still using HTML5/Flash.

Math Notermans

V Raja's solution requires jQuery. Any Javascript code you see with $ signs in it are using jQuery. And as jQuery is not included anymore in Storyline it wont work as is.

To convert jQuery code to Vanilla Javascript ( Vanilla as it doesnot require any 3rd party libraries like jQuery ) you can use this link.