XFA Specification
Chapter 11, Forms That Initiate Interactions with Servers
Submitting Data and Other Form Content to a Server
327
The following sections discuss how the
submit
syntax supports various form-oriented workflows.
Client Submit Event That Does Not Expect Returned Data
This section describes the processing steps that are initiated when a submitting event is activated. The
steps depend on whether the XFA processing application declare itself as a client or as a server.
Client.
The client XFA processing application performs the following steps when a
submit
event is
activated:
1. Execute all validation scripts that contain a
runAt
attribute set to
client
,
both
or undefined. If this
step raises exceptions, the requested content should not be submitted to the server.
2. Execute all
nullTest
checks. If this step raises exceptions, the requested content should not be
submitted to the server.
3. Execute all
formatTest
checks. If this step raises exceptions, the requested content should not be
submitted to the server.
Note:
Validation,
nullTest
and
formatTest
are executed for the entire form, regardless of the
actual content submitted.
4. Collect the specified data into a
connectionData
element underneath
$datasets
.
Note:
When the above step completes, the Connection Data DOM changes state.
5. Examine the form for any
preSubmit
events that contain scripts with a
runAt
attribute set to
client
,
both
or undefined. If such scripts are found, execute them. Scripts executed at this point have
the chance to examine and alter the data before it is submitted. If this step raises exceptions, the
requested content may still be submitted to the server. (“DOM
Events” on page 305)
6. Package the data and any other content, as specified in the
submit
properties:
format
,
embedPDF
and
xdpContent
. (“Content
Interchange” on page 325)
7. Send the data to the server using the HTTP post operation. If the form contains any
preSubmit
events
with scripts having a
runAt
attribute set to
server
or
both
, the client includes in the data special
instructions. These special instructions tell the server which
preSubmit
events it (the server) should
immediately process. The format of such special instructions is implementation-defined.
The response to an HTTP POST failure is implementation-defined.
Server.
The server XFA processing application performs the following steps after it finishes building the
form DOM:
Caution:
For security reasons, the server should discard any template submitted in the XDP package and
obtain a fresh copy of the template from a trusted source.
1. Create the Form DOM.
2. Examine the data for special instructions that indicate
preSubmit
events. If such instructions are
found, examine the events they indicate for scripts that contain a
runAt
attribute set to
server
or
both
. If such scripts are found, execute them.
3. Execute all calculation scripts that contain a
runAt
attribute set to
server
or
both
.
4. Execute all validation scripts that contain a
runAt
attribute set to
server
or
both
.
Home Index Bookmark Pages
Pages: Home Index All Pages