Form Builder – Data Model
Compose Enterprise is going through a design update. The illustrations on this page might be of the old design, but the information is up to date. Thank you for your patience during this update!
The Data Model in the Form Builder can be described as the core of the form. It is an overview of all the form elements that collect data/answers from the end user, aka. only the question elements (not tables, buttons, images etc.). In forms with multiple views, the data model displays all the question elements used across all views and which elements are displayed in each view. In addition, some advanced settings can be added in the Data Model (and not via the Builder section). You may set validation scripts and create duplicatable elements in question groups. You may add question elements in the Data Model, so it’s up to you whether you want to start building the form in the Data Model or the Builder.
Elements
The Data Model consists of the data model overview, an Elements panel and a Properties panel for the selected elements in the overview. The possible elements you can add from the Data Model section are the question elements Input, Single-select, Multi-select and File, and the non-question element Question Group. The settings in the Properties panel is identical for Input, Single-select and Multi-select.
Input-, Single-select and Multi-select question properties
Basics | |
---|---|
Name | The question label you want the user to read in the published form. |
Validation | This can be String, Integer, Decimal or Date by default in addition to customized validations you've created in the Validation Builder. Validates that the answer is of the right data type/format. |
Alias | Question alias is a unique additional identifier that may be set on a question. It is non-mandatory and there are rules as to which names it can take. It can't e.g. contain white-space characters and must have a length of 1 to 40 characters. The question alias can be used to automatically map form questions with a PDF template in the workflow builder. |
Max | Set the maximum valid input character length allowed. |
The Question is | This can be Mandatory, Recommended or Optional, and this property is used for the Validation Activity. The end user will be notified when a mandatory or recommended element has not been answered. |
Conditions | |
---|---|
Validation Script | The objects which are available for display conditions are also available for the validation scripting as its part of the CNG Scripting API. Validation scripting requires more technical skills as it involves string/integer operations. For more information about Groovy scripting, please see http://www.groovy-lang.org/. |
Validation Error Message | If respondent user enters a value in the input field that fails the script validation (see above), the message entered in this field will be shown in the respondent view. |
Display Condition | See display in Script documentation. |
Enable Condition | See enable in Script documentation. |
File question properties
The Basics and Conditions properties are mostly identical to the other question elements. The main differences are the Validation dropdown and the Max setting. Files can be validated as Binary (any file), PDF, Text or XML, and the Max does not set the maximum amount of characters, but the maximum file size of the submitted file measured in bytes. The Conditions properties are identical to the other question elements.
Question group properties
The Question Group is mainly used as a container for question elements that may be duplicated by the end user. Say it’s best to leave it up to the end user how many attachments they should be able to upload. You may then connect a duplicatable question group to a table or a group element in the Builder section which contains the question elements that should be duplicatable. This feature is displayed in detail in the Duplicatable elements - Question Groups user guide.
Basics | |
---|---|
Name | The name of the question group. |
Alias | Question group alias is a unique additional identifier. It is non-mandatory and there are rules as to which names it can take. It can't e.g. contain white-space characters and must have a length of 1 to 40 characters. |
Duplicatable | If this check box is checked the group is duplicatable. This allows for table rows/group elements added to the question group to be duplicated in the respondent view. |
Maximum Limit | Set the maximum amount of duplicated elements. |
Conditions | |
---|---|
Display Condition | See display script under Script documentation. |
Enable Condition | See enable script under Script documentation. |