XFA 3.0: Message Handling Options

Of the XFA 3.0 enhancements, it’s safe to say this one was overdue.  Today XFA processor in Acrobat/Reader notifies users about invalid fields by popping up dialog boxes.  However, form authors feel so strongly about wanting control over the notification mechanism that they develop elaborate JavaScript frameworks to avoid using the message boxes associated with the built-in validation/notification mechanism.

To put the flexibility back in the hands of the form author, XFA 3.0 has a new configuration setting to control how errors are handled:

        noMessages              |
firstMessageOnly        |
        allMessagesIndividually |


Don’t worry about remembering the syntax or where it goes — Designer will have a UI for setting this option.
The impact of this setting is pretty self-explanatory — but I’ll explain anyway:

  • noMessages – Acrobat/Reader will not emit any messages for invalid fields.  It will be up to the form author to notify the user in some way — likely by changing the appearance of the invalid fields.

  • firstMessageOnly – When there are multiple errors on the form, Acrobat/Reader will display a message box for the first error and will suppress messages for all subsequent errors.  This prevents the user from being inundated with a long series of messages — one from each invalid field.

  • allMessagesIndividually — (default) This corresponds to today’s behaviour.  Well, not quite.  There are instances today where we combine messages — for example messages for missing mandatory fields.  But combined messages don’t happen as much as you might like.

  • allMessagesTogether — Aggregate all the messages from all invalid fields and emit a single dialog with all messages combined.

The sequence of validation script execution remains the same no matter which messaging option is chosen.  If the user attempts to submit when there are still missing or invalid fields, the submit operation will cancel with a message box.

Comments are closed.