2021.2

Table Of Contents
To insert a placeholder in a field, type a label and choose Use label as placeholder as its style
when adding the element to the form; see "Adding elements to a Form" on page561.
Making elements required
To change the validation of a COTG or Form element, right-click the element and choose
Validation settings. Now you can change the Form's validation method and set the
requirements per field; see "Changing a Form's validation method" on page720.
Grouping data using arrays
In a Connect solution, when a Web Form or COTG Form is submitted, there is a Workflow
process that receives the data and creates a job data file (which is an XML file). Having arrays
in the job data file greatly simplifies creating a data mapping configuration and looping over
data in Designer scripts. Here's how to group data in the HTML so that they get submitted as
arrays.
Note
To enable submitting arrays, you need to check the Use PHP arrays or Use enhanced
PHP arrays option in the HTTP Server user preferences in Workflow; see Workflow
Online Help.
A simple method to create arrays in the job 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">
Page 564