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

Allow the use of the "plus" character in a text field.

$
0
0

I have a script on the change event that allows only numbers 1 to 100 and the values a,b,c,d,e,r,i,n. I also want to allow the "-" and "+" entries in the field.

The script below works for the entries, with the exception of the "+" character. How do i change the script so that the field allows an entry like A+, B+, etc.?

 

On change:

if (xfa.this.change!="" && !xfa.event.newText.match(/^[1-9][0-9]?$|^100|^(a|a-|b|b-|c|c-|d|d-|e|e-|r|n|i)$/)){

xfa.event.change ="";

xfa.host.messageBox("Incorrect entry... Thanks!");

}

 

On exit:

this.rawValue=this.rawValue.toUpperCase()

 

 

Any help would be appreciated!


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>