Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • value - a string containing the value being submitted to the serveroriginal user input value.
  • fieldInfo - information about the field. The format of this parameter is different for Rich Display File screens vs. Genie/5250 screens, and is subject to addition of properties in the future. It's recommended to explore the parameter with a JavaScript debugger to see what the available properties are.
  • context - a string set to either "genie" for Genie/5250 screen, or "dspf" for Rich Display File screen.

If the pui.inputfilter function returns a string, the return value will be used in place of the original value. Any other type of return value (or if no value is returned) will result in the original field value being used.

If an unhandled exception occurs in the function, the original user input will be used and the exception will be logged to the browser's console. 

Example:

The following code replaces tabs with a space, and "smart quotes" (such as copied/pasted from MS Office apps) with the normal single/double quote character.

...