Which Version of Reader?
In some cases you may want to ensure that the users filling in and submitting your forms are using the version of Reader that you designed your forms to function with. In most cases if you have developed your form with functionality that requires Reader 8.1.1 for example, and the user opens the form in Reader 7.0.9, Reader will attempt to "degrade gracefully" providing as much functionality as possible to the user. They will be notified that the form may not work as designed and that they should upgrade but they may still be able to complete and submit the form.
You can control your form programmatically by looking at the host "version".
var vCurrentVersion = 0;
vCurrentVersion = xfa.host.version;
vCurrentVersion will be equal to the version of Reader currently used. In my case, the numeric value is 8.101.
If you're curious as to whether or not Reader or Acrobat has been used to complete the form, that can also be detected.
var vApplicationName = "";
vApplicationName = xfa.host.appType;
vApplicationName will result in either 'Exchange-Pro" for Acrobat or "Reader" for Reader.
To tie the version and the logic together you'd be looking at something like this:
if(xfa.host.version >= 8.101)
{
resultText.rawValue = "Good.";
}
else
{
resultText.rawValue = "Bad.";
}
In the case of "Bad" you may want to protect the form fields or disable the submit button to ensure version compliance of your users.