Expand my Community achievements bar.

How to add Submit button-like features to the Print button ?

Avatar

Former Community Member
I have a Print-only form with a Print button. I want to add the following features to the Print button (which simply calls xfa.host.print by default)....



1. Have it check for empty, required fields (this I have actually already done using a modified version of the HighlightRequiredFields example).



2. Run the validation scripts against each field and detect their return value and stop if one fails that is marked as an "error".



3. Run a pattern test against each field to check it against the validation picture clause and stop if it fails and is marked as an "error".



This is obviouslly do-able since the Submit button is doing it down in the bowels of it's hidden code. I'd like to be able to bundle this into a re-usable script, and not write field or form specific validation scripts.



Any clues ?



Thanks
0 Replies