Workflow:Form: Difference between revisions

From ContactsLaw Documentation
(Created page with "{{DISPLAYTITLE:Interactive Form}} {{Prealpha}} TBA Category:Workflow")
 
No edit summary
Line 2: Line 2:
{{Prealpha}}
{{Prealpha}}


TBA
'''Interactive forms''' allow users to interact with [[Workflow:Process|processes]]. The process editor includes a form designer that gives the author a high degree of control over the functional and visual design of their forms.
 
Forms can be created for almost any purpose, including:
 
* Process guidance
* Decision-making
* Advanced document production
* Surveys and feedback
 
Every form belongs to a particular process. Processes can include multiple form designs. They are shown using [[Workflow:Process#Rules|rules]] and cause the process to be paused until they are completed. Users can save their progress and continue later.
 
== Properties ==
Forms have the following properties:
 
* An associated [[Asset|'''asset''']] in the process
* A descriptive '''name'''
* The ability to explicitly [[Time Record|'''record time''']]
* Rules that execute when particular [[Workflow:Form#Events|'''events''']] occur
* A visual design consisting of [[Workflow:Form#Pages|pages]], [[Workflow:Form#Blocks|blocks]] and [[Workflow:Form#Controls|controls]]
 
== Pages ==
'''Pages''' allow users to progress through the form in a structured manner.
 
They can be selectively hidden using [[Workflow:Process#Rules|rules]] or according to a conditional [[expression]]. If a page is hidden, its requirements no longer apply.
 
== Blocks ==
Pages consist of one or more '''blocks''', which are used to group content.
 
As with content markers in [[Document Template|document templates]], blocks can be made ''conditional'' or ''repeated'' according to an [[expression]]. Blocks can contain other blocks, allowing for hierarchical designs.
 
== Controls ==
'''Controls''' are placed inside blocks, comprising the visual design of the form. A control can be used to present, capture or interact with information; for example, a label or a text field.
 
=== Binding ===
Controls can be bound to [[Asset|assets]] in the process. This means that they present information that draws upon the asset and, depending on the type of control, may also allow the resource(s) represented by the asset to be added/updated. Bindings are more straightforward than using [[Workflow:Process#Rules|rules]] to manage assets (which are only needed in advanced scenarios).
 
''Evaluating'' a binding means to present the information from the asset using the control. ''Updating'' a binding means to add/update the resource(s) represented by the asset.
 
== Events ==
Forms can include [[Workflow:Process#Rules|rules]] which are executed when particular '''events''' occur; for example, when a page is first displayed or when the user enters text into a field.
 
Compared to rules on [[Workflow:Process|processes]], rules on forms are limited to actions that do not directly create/modify resources in ContactsLaw. This ensures that users can cancel the form without making any permanent changes. It is still possible to record pending changes to assets - these will be applied when the form has been completed.
 
The following types of events are supported:
 
* '''Initialised''' - Occurs when the form or a specific page is displayed for the first time. For blocks and controls, this occurs when the page on which they appear is first displayed. Rules are executed once only, making this a good time to create new resources.
* '''Changed''' - Occurs when a control's value changes. For other components, this occurs when the value of a control contained within the page/block changes. Rules are executed once for each change that occurs.
 
Rules are always executed ''after'' bindings on controls are updated. Rules for a particular event cannot trigger other events on the form.
[[Category:Workflow]]
[[Category:Workflow]]

Revision as of 18:49, 3 October 2024

The information in this section relates to a pre-release version of ContactsLaw and is not representative of the final product.

Interactive forms allow users to interact with processes. The process editor includes a form designer that gives the author a high degree of control over the functional and visual design of their forms.

Forms can be created for almost any purpose, including:

  • Process guidance
  • Decision-making
  • Advanced document production
  • Surveys and feedback

Every form belongs to a particular process. Processes can include multiple form designs. They are shown using rules and cause the process to be paused until they are completed. Users can save their progress and continue later.

Properties

Forms have the following properties:

Pages

Pages allow users to progress through the form in a structured manner.

They can be selectively hidden using rules or according to a conditional expression. If a page is hidden, its requirements no longer apply.

Blocks

Pages consist of one or more blocks, which are used to group content.

As with content markers in document templates, blocks can be made conditional or repeated according to an expression. Blocks can contain other blocks, allowing for hierarchical designs.

Controls

Controls are placed inside blocks, comprising the visual design of the form. A control can be used to present, capture or interact with information; for example, a label or a text field.

Binding

Controls can be bound to assets in the process. This means that they present information that draws upon the asset and, depending on the type of control, may also allow the resource(s) represented by the asset to be added/updated. Bindings are more straightforward than using rules to manage assets (which are only needed in advanced scenarios).

Evaluating a binding means to present the information from the asset using the control. Updating a binding means to add/update the resource(s) represented by the asset.

Events

Forms can include rules which are executed when particular events occur; for example, when a page is first displayed or when the user enters text into a field.

Compared to rules on processes, rules on forms are limited to actions that do not directly create/modify resources in ContactsLaw. This ensures that users can cancel the form without making any permanent changes. It is still possible to record pending changes to assets - these will be applied when the form has been completed.

The following types of events are supported:

  • Initialised - Occurs when the form or a specific page is displayed for the first time. For blocks and controls, this occurs when the page on which they appear is first displayed. Rules are executed once only, making this a good time to create new resources.
  • Changed - Occurs when a control's value changes. For other components, this occurs when the value of a control contained within the page/block changes. Rules are executed once for each change that occurs.

Rules are always executed after bindings on controls are updated. Rules for a particular event cannot trigger other events on the form.