Forms
- 1 Purpose and use
- 2 Structure
- 3 Elements
- 4 Form elements
- 4.1 Text
- 4.1.1 Examples
- 4.1.2 Attributes for Text
- 4.1.3 Contents for Text
- 4.2 YesNo
- 4.2.1 Examples
- 4.2.2 Attributes for YesNo
- 4.2.3 Contents for YesNo
- 4.3 Date
- 4.3.1 Examples
- 4.3.2 Attribute für Date
- 4.3.3 Contents for Date
- 4.4 Choice
- 4.4.1 Examples
- 4.4.2 Attributes for Choice
- 4.4.3 Contents for Choice
- 4.5 Objects, ObjectCollections und DataProvider
- 4.1 Text
- 5 Ãœbersetzungen
- 6 Glossary, Terms
- 7 Extensive example
- 7.1 Code
- 7.2 Screenshot
Purpose and use
This document function can be used to query content via a form by configuring text boxes, checkboxes, dropdowns, etc., so-called elements.
Structure
<FormsConfiguration>
<Elements>
<!-- Insert form elements and groups here -->
</Elements>
</FormsConfiguration>
Elements
Groups
Groups are structure elements and group form elements with <Group>...</Group>
for visual representation.
<FormsConfiguration>
<Elements>
<!-- [Form elements] -->
<Group Title="Phone numbers">
<!-- [Form elements] -->
</Group>
<!-- [Form elements] -->
</Elements>
</FormsConfiguration>
Groups must not contain other groups (no nesting).
Attributes for Group
Attributname | Description |
---|---|
| Title that will be displayed on the input interface. |
Info
This element allows to display information text in the Forms dialog. The text to be displayed is specified as the content of the Info
element.
Example:
<FormsConfiguration>
<Elements>
<Info>Important: Each log must also be sent in the Teams channel `Log feed`.</Info>
</Elements>
</FormsConfiguration>
Form elements
Text
The Text
element provides the user with the ability to enter text in Forms. Accordingly, it is typically displayed as a text box. A Plain Text Content Control is inserted in the Word template.
Examples
Simple
Advanced
Attributes for Text
Attribute name | Description |
---|---|
| Required for identification (insertion in template, use in scripts). Must not contain spaces and must be unique. Forms automatically adds the prefix |
| Label of the element in the input interface. |
| Predefined text that the user can edit |
| If |
| If |
Contents for Text
Element name | Description |
---|---|
| Additional information for the user filling in the form. Displayed in the input interface (possibly as a tooltip). |
| Text that will be displayed to the user if this text field was filled in invalidly. |
YesNo
The YesNo
element provides the user with the ability to check ("Yes") or uncheck ("No") an option in the input interface. Accordingly, it is typically displayed as a check box. A Check Box Content Control is inserted in the Word template.
Examples
Simple
Advanced
Attributes for YesNo
Attribute name | Description |
---|---|
| Required for identification (insertion in template, use in scripts). Must not contain spaces and must be unique. Forms automatically adds the prefix |
| Label of the element in the input interface |
| If |
| If |
Contents for YesNo
Element name | Description |
---|---|
| Additional information for the user filling in the form. Displayed in the input interface (possibly as a tooltip). |
| Text that will be displayed to the user if this text field was filled in invalidly. |
Date
The Date
element provides the user with the ability to select a date in the input interface. Accordingly, it is typically displayed as a date picker. A date picker content control is inserted in the Word template.
Examples
Simple
Advanced (with Value and Required)
Advanced (with RelativeDate)
Attribute für Date
Attribute name | Description |
---|---|
| Required for identification (insertion in template, use in scripts). Must not contain spaces and must be unique. Forms automatically adds the prefix |
| Labeling of the element in the input interface |
| Definition of the date format, e.g. |
| If |
| Pre-selected fixed date that the user can edit. |
| Pre-selected date that the user can edit and that is relative to the time of document creation.
The
|
| Number of months added to the relative date (positive and negative numbers allowed). See |
| Number of days added to the relative date (positive and negative numbers allowed). See |
Contents for Date
Element name | Description |
---|---|
| Additional information for the user filling in the form. Displayed in the input interface (possibly as a tooltip). |
| Text that will be displayed to the user if this text field was filled in invalidly. |
Choice
The Choice
element provides the user with the ability to choose between different options in the input interface. Accordingly, it is typically displayed as a drop down. A combo box content control is inserted in the Word template.
Examples
Simple
Advanced
Attributes for Choice
Attribute name | Description |
---|---|
| Required for identification (insertion in template, use in scripts). Must not contain spaces and must be unique. Forms automatically adds the prefix |
| Label the element in the input interface. |
| If |
| Preselected option: The value that is in the |
| Label of the option symbolizing "nothing selected" |
Contents for Choice
Element name | Description |
---|---|
| Possible selection. At least one possible selection must be configured.
|
| Additional information for the user filling in the form. Displayed in the input interface (possibly as a tooltip). |
| Text that will be displayed to the user if this text field was filled in invalidly. |
Objects, ObjectCollections und DataProvider
This function is not available in "classic" templates.
As an alternative for "classic" templates, contact data can be accessed via the Address interfaces. For more information about the different template versions, go here.
In order to store objects, such as a recipient or invoice items, in the document, an Object
or an ObjectCollection
can be defined. Often you want to load such data from a CRM or another source. To access these sources, DataProvider
s can be defined.
An Object
or an ObjectCollection
is displayed in Forms as follows:
Like any element, Object
s oder ObjectCollection
s can be configured any number of ways. More information can be found on the Data interface page.
The following example shows the basic structure of an ObjectCollection
. It consists of Schema
, Summary
as well as DataProvider
s:
Ãœbersetzungen
All the above-mentioned elements can be displayed with translation. If an attribute with the prefix translate-
is used, the corresponding attribute does not have to be configured as well.
Translations are fetched from the Global Translations as follows:
Attribute name | Description |
---|---|
(optional) | Translated label of the element in the input interface. |
(optional) | Translated additional information for the user filling in the form. Displayed in the input interface. |
| Translated text displayed to the user if this selection was filled in invalidly. |
| Translated, predefined value (depending on the element type) that the user can edit. |
Application example from above with translated labels:
Glossary, Terms
Name | Description |
---|---|
Forms | Name of the new document function, formerly quasi "Document Parameter". |
Forms dialog | Name for the new dialog, formerly quasi "Document Parameter dialog" |
Form element | An input element in the Forms dialog, e.g. of type "Text" or "Choice |
Structural element | Elements that are displayed in the Forms dialog but do not request input and therefore do not end up in the Document Part |
Field | All form elements, which finally end up in the Document Part |
Plain Text Content Control | Word content control that can only contain text |
Date Picker Content Control | Word content control where a date can be selected |
Check Box Content Control | Word content control with CheckBox icon that can be enabled and disabled |
Drop-Down List Content Control | Word content control, where you can choose from predefined options |
Combo Box Content Control | Word content control, where you can choose from predefined options and enter any text you want. |
Object | An object is defined via a schema. Objects can be filled manually or via |
ObjectCollection | A collection of objects. The difference to the object is that the list can store multiple objects of the same type. |
DataProvider | Defines a source for objects. |
Extensive example
The field order in Forms dictates the order in the dialog.
Code
Forms
Felder
Screenshot
Â
PrimeSoft AG, Bahnhofstrasse 4, 8360 Eschlikon, Switzerland