We received a request for a lottery ticket checker and this is the resulting example. Please note that we do not warrant the use of the form for checking of actual lottery results.
The example shows how you can set up generic functions to look at data that is inputted into the form. For example, to limit the range of data (1 to 45 inclusive) or to warn the user if they have inputted a duplicate value. We have updated the example to swap out the xfa.host.messageBox() dialogs and replace them with a neater warning, which is less disruptive to the user’s experience.
We also use the <desc> element as a form variable associated with each of the number fields. This tracks the matched numbers. See this example for a full description.