1.5

Table Of Contents
the requirements and a message per field. For an explanation see "Changing a Form's
validation method" on page433.
Grouping data using arrays
A Job Data File is an XML file created by a Workflow process on submitting a Web Form or
COTG Form. Grouping data in a Job Data File greatly simplifies both the Data Mapping
workflow and looping over data in Designer scripts. A simple method to create arrays in that
data file is to use two pairs of square brackets in the name of the form inputs. Put the name of
the array between the first pair of square brackets. Between the second pair of square brackets,
define the key to which the value belongs. Consider the following HTML form inputs:
<input type="hidden" name="user_account"
value="pparker@eu.objectiflune.com">
<input type="text" name="name" value="Peter Parker">
<input type="text" name="company" value="Objectif Lune">
<input type="text" name="pinElm1[pin_0][left]" value="122">
<input type="text" name="pinElm1[pin_0][top]" value="253">
<input type="text" name="pinElm1[pin_0][type]" value="dent">
<input type="text" name="pinElm1[pin_1][left]" value="361">
<input type="text" name="pinElm1[pin_1][top]" value="341">
<input type="text" name="pinElm1[pin_1][type]" value="dent">
The above HTML results in the following XML:
<values count="4">
<user_account>pparker@eu.objectiflune.com</user_account>
<name>Peter Parker</name>
<company>Objectif Lune</company>
<pinElm1>
<pin_0>
<left>122</left>
<top>253</top>
<type>dent</type>
</pin_0>
<pin_1>
<left>361</left>
<top>341</top>
<type>dent</type>
</pin_1>
</pinElm1>
</values>
Page 368