Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 92756

Re: How can I limit the entry options to specific alphabet characters or the numbers 1 to 100 in a text field?

$
0
0

Thanks, I also posted it there. Actually, it took spending time on the JavaScript sites to eventually figure out the answer. Here is what works for me:

On the change event:

//Test input in real time. Only allow approved grades between 1 and 100, r, i, n

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

     xfa.event.change ="";    

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

     }


Viewing all articles
Browse latest Browse all 92756

Trending Articles



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