Forms
This module designs the forms through which the user sees and enters the metadata: metadata dialog boxes, search forms, signature pages.
A form decides which metadata is presented, in which order, in which input form, and under which conditions each one is mandatory, greyed out or hidden. The same set of metadata can therefore be presented differently depending on the moment: a short creation form, a full consultation form, a search form.
Forms apply to contents as well as to business objects (Case): a switch in the navigation bar moves from one to the other. Several forms can be created.
It is built by dragging and dropping items, each item having its own configuration.
Purposes
Forms are classified by purpose. The purpose defines in which case the form is used:
Metadata: standard form, used to display the metadata of a content or a business object
Search: search form, displayed on entering a room or to search a business object
Mass update (content only): used for the mass update of contents
Signature: used as a signature page
Extensions: form made available to the extensions
Layout components
Layout components define the structure of the form.
Category: gathers metadata in a page while hiding those of the other categories, in the manner of a tab system. It displays only a small number of metadata in a form that holds many, for a faster display. Displaying a new category triggers the loading of its metadata. Because of this asynchronous nature, categories are not usable in offline mode.
Section: groups items under a label displayed at the top of the section. Once created, items can be dragged and dropped into it.
Grid: displays repetitive properties in a grid.
Reserved space: inserts an empty item to reserve the space.
Information: displays an information or help text.
Separator: inserts a separator.
Components reserved to the search form
These three components are only available for the forms whose purpose is Search.
Header: settings of the header
Footer: settings of the footer
Background: settings of the background
Fields
Fields display either metadata, stored in the document, or keys, which are not.
A key is not attached to an aspect and is not saved in the metadata of the document: it only lives for the time of the form, which suits a working input such as a signature password or an intent. It is automatically prefixed by key..
Display options
Every input component has a "Display options" box that formats the displayed text: font size, color and weight (light, normal, bold). By default, the field is 14 px, without color (or black), in normal.
These styles are handled by each component itself. They therefore apply in every form (creation, import, metadata, signature) and both in viewing and in editing.
The dual lists have an extra parameter, which defines the size of the displayed dialog box (small, medium or large).
Field types
Label:
Displays a metadata as a label, not editable.
Input:
Displays a metadata as an input text. Three options are available:
- Single line (which can be set as a password input)
- Text area (whose number of lines can be set)
- URL
Password: hides the entered characters.
Always display on read mode: displays the field read-only. Without this option, a field whose value is empty is not displayed.
Minimum length and Maximum length of the entered text.
Value constraint: see Value constraint.
List:
Multiple: allows the selection of several values.
Display mode:
- Synchronous list: every value is displayed in a drop-down list
- Asynchronous list: every value is displayed asynchronously in a drop-down list
- Dual list: every value is displayed in a list and can be selected in another
- Checkbox list: every value is displayed in a list and selected with checkboxes
Value constraint: see Value constraint.
Always display on read mode: the metadata is not editable.
Date picker:
Displays a date picker. Tick the "include time" box to also set the time. A minimum date and a maximum date can be set.
Checkbox:
Displays the values as checkboxes or switches.
Data object picker:
Links a content to a business object. Clicking that business object opens the corresponding page.
URL:
Displays a URL. A click opens the corresponding link. This component only accepts URL metadata (defined in the Aspects module) and is only available for the metadata, content or Case forms: the other purposes, such as mass update, do not offer it. It can be placed in a grid.
Value constraint
A value constraint restricts what the user can enter, through a regular expression (pattern) the value must match. If the value does not match, the validity message is displayed and the form cannot be saved.
Usable tokens:
| Token | Matches |
|---|---|
\d | Any digit |
\D | Any character that is not a digit |
\w | Any word character (letter, digit or underscore) |
\W | Any character that is not a word character |
\s | Any whitespace character |
\S | Any character that is not a whitespace |
[a-z] | A character in the range a-z |
[^a-z] | A character not in the range a-z |
b{4} | Exactly 4 "b" characters |
b{3,} | 3 "b" characters or more |
b{3,6} | Between 3 and 6 "b" characters |
. | Any character |
? | 0 or 1 occurrence of the previous element |
* | 0 or more occurrences of the previous element |
+ | 1 or more occurrences of the previous element |
^ | Start of string |
$ | End of string |
\\ | Escapes a special character |
For instance, \$\d{1,3} requires a dollar amount between $0 and $999.
For advanced combinations, refer to a JavaScript regular expression documentation.
Validity message: message displayed when the constraint is not met.
Data control
The data control defines the values offered by the field.
Replace values: overrides the data list configured in the aspect
Source type: data list, or user and group list
Data list: data list created in the Data lists module
Stored value: row value that is stored
Display value: row value that is displayed in the interface
Users / groups: says whether the field offers users, groups, or both
Restrict members to a group: limits the list to the members of the entered group
Filter data: filters the list by one or several predicates listed in the table
- Column: column used to filter the list.
- Value: filtering predicate. If a column holds a group name, entering
${user.groups}in the "value" column only offers the values to the users members of that group: this wildcard retrieves the list of the groups of the user.
Allow new value: lets the user enter a value absent from the list.
Next metadata: next metadata of the taxonomy.
Reset fields on change: resets the selected fields when the current field is changed.
Default value: value applied only when the template used for the creation or the import defines no value.
Grid control
This section is only available if the field is placed in a grid. It defines the width of the cell.
Advanced conditions
Each field can be subject to conditions, for three behaviors:
Required: mandatory field: the form cannot be saved with an empty value.
Disabled: read-only field.
Hidden: hidden field.
For each, two options are available:
Form mode:
- Create: applied in the creation process
- Edit: applied in the metadata edition mode
- Import: applied in the import process
JavaScript condition: condition expressed in a JavaScript script.
Flows
This module can be used in the following flows: