Quantcast
Channel: Adobe Community: Message List - PDF Forms
Viewing all articles
Browse latest Browse all 57214

Re: How can a field be formatted to limit the specific characters it accepts.

$
0
0

If you want to restrict the user to only the letters 'M', 'Q', or 'X', then you could use a combobox with those values. Alternately, adding this to the custom keystroke script for your text field would reject all other characters:

 

var re = /[mqxMQX]/

if (event.change.length >0) {
     if (event.willCommit == false) {
          if (re.test(event.change)) {
               event.change = util.printx(">AA", event.change);
          } else {
               event.rc = false
          }
      }
}


Viewing all articles
Browse latest Browse all 57214

Trending Articles



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