You can use the Custom Keystroke or Validation actions.
Or use a drop-down field instead of a text field...
There are sixteen fields where we only want to allow an X or N/A. The drop down box and list box do not look good on the form. We want a text field that only allows one of the two entries.
I would use the following Custom KeyStroke script to convert each key entered to upper case:
event.change = event.change.toUpperCase();
I would create a document level function that verifies a string is either an empty string, an "X", or "N/A". It returns logical true value if either of those conditions is met. This returned value can be used to set the return code for a validation script.
var RC = true;
cString = cString.toUpperCase();
if(cString != "X" && cString != "N/A" && cString != "")
app.alert("Enter 'X' or 'N/A'", 1, 0);
RC = false;
} // end function XNA which tests a String for being X, N/A or a null string;
I can then have a validation script like:
event.rc = XNA(event.value);
That worked great gkaiseril! Thanks so much.