Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Text field lenght

Avatar

Former Community Member
Hello;

A simple question, but I could not figure out how to check the text field's entered value lenght in the exit event of the field with JavaScript.



In the exit event of the field I tried



if(this.rawValue.length == 9)

xfa.host.messageBox("Length is 9");



This does not work? What must be the script in JavaScript? Is there a build-in function like "Len" in FormCalc? Or sth else?



Thanks.



Asiye
2 Replies

Avatar

Former Community Member
I know very simple question but can anyone give the answer?

Thanks.

Avatar

Level 5
Try this to see if you get a result in the Exit Event:

app.alert("Length:" + this.rawValue.length);



Mark