I discovered something interesting the other day: Just because Designer wants you to type script for a field’s Full event doesn’t mean you have to execute script when the Full event is triggered.
The XFA 2.8 specification specifies the <event> node’s content as being one of the following nodes: <script>, <execute> (executes a web service data connection), <submit> (causes the form to be submitted via email or HTTP) or <signData> (causes the form to be signed). Only one may be specified and whatever content is there will be executed when the event is triggered.
This means that you could, for example, cause a web service to be executed whenever a repeatable subform’s index changes (i.e. whenever you add/remove instances).
Is this useful? Well, perhaps not, but I thought it was interesting! Who knows what you might think of doing with this…
<event activity="full" name="event__full"> <submit format="xml" textEncoding="UTF-8" target="mailto:"/> </event>
Check-out my little sample form that causes the form to be submitted via email when you fill the text field at the top and where a web service data connection is executed whenever you add an instance of Subform2 using the button at the bottom (below the web service import/export fields).
Sample Minimum Requirements: Designer and Acrobat Standard/Pro 8.0 (XFA 2.5)
Posted by Stefan Cameron on January 30th, 2009
Filed under Events,Scripting,Tutorials,XFA