Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Setting focus and nulling a field after a Length check

$
0
0

I have a form I'm working on which requires some basic length checks but I'm having trouble with one of my fields. In the change event I have this:

 

if (xfa,event.newText.match (/[^0-9/) !== null){

     this.rawValue = null;

     xfa.host.setFocus(this);

}

 

else if (xfa.event.newText.length > 9){

     this.rawValue = null;

     xfa.host.setFocus(this);

}

 

but it will not null the field or set the focus to the field when it fails either check. I'm not sure what the problem is though.

 

Thanks!


Viewing all articles
Browse latest Browse all 5571

Trending Articles