Form Builder Overview

Was this article helpful?

Form Builder lets you add your own custom data capture forms to Clio Operate. You build a form from fields, add it to a blade with a Form Builder aspect, and Clio Operate saves the answers for you.

Quick start

Key concepts

Aspects and Form Builder aspects

  • Aspect: a section of the user interface that you add to an object, for example a work item, a participant or an ODS entity.
  • Form Builder aspect: a special type of aspect that adds a custom data capture form to a blade. The aspect is the container for the form. Clio Operate saves the form's data, so you don't need to set up any connections.

Add a Form to a Work type

The parts of a form

Part Description
Form definition The general information about the form, such as its title and layout. A new form starts from a standard template. You can use the template as it is and give the form a title.
Section definition Sections split a form into groups of fields, so that the data is easier for the user to work through.
Field definition The details of one field, such as its name, title, type, help text and attributes. For the properties that every field has, see Properties on every field.
Form Builder aspect Shows the form on a blade. You add it to the blade of a work type, participant, ODS entity or party type.
GUID The unique identifier of each element. Each time you copy a snippet, the copy gets its own GUID.

Field names are shared within a record

Each field has its own GUID, but Clio Operate saves each answer against the field's name and the record that the form is on. The record can be a work item, a participant, an organisation or a team.

For example, two forms on the same matter can both contain a field named favouriteColour. Both fields read and save the same answer, so the matter holds only one value for favouriteColour. Clio recommends that you give fields a new name unless you want them to share an answer.

The same field name on a different record saves a separate answer. A favouriteColour field on a person holds a different value from a favouriteColour field on a task.

 
 
 

Where you can use forms

You can add Form Builder aspects in these places:

Work types include many of the out-of-the-box types, such as instructions, cases, payments, offers, tasks and service requests.

 
 

Add a form to a blade

How a form displays on a blade

A Form Builder aspect displays its form in one of two ways. The form can display as a section of the blade. Or it can display as an item in the blade's navigation bar, which opens the form on its own blade.

Every work type has a key facts blade, and each section of that blade is an aspect. This example is the key facts blade of a task work type.

In Modeller, the Aspects Editor for the same work type lists each aspect in its zone. To add a form, add a Form Builder aspect to the zone where you want the form to display.

Display a form inline or from the navigation bar

The Display Style setting on the Form Builder aspect controls where the form displays:

  • Inline: the form displays as a section of the blade.
  • Nav Bar: the form opens on its own blade from the blade's navigation bar. Add the aspect to the FOOTER zone of the blade.

To change the setting, select the cogs button (Edit Aspect Config) on the aspect. The same panel holds the Form Name, Show Title, Title and Icon settings.

Control when a form displays and who can edit it

Select the eye button (Edit Display Rules) on a Form Builder aspect to open the Display Configuration panel. The panel has three sections.

Section What you can set
Display Rules Hide the form from users at all times with Never display this aspect. Or, under Show / hide based on business rules, select the business rules that decide when the form displays.
Read Only Make the form read only at all times with Make this aspect read only. Or, under Read only when these business rules match, select the rules that make it read only, for example in a particular phase. Available from Clio Operate 7.13.
Edit Permission Select the global permission that a user needs to edit the form. Users without the permission can still see the form, but they can't change it.

A read-only setting applies wherever the form is used: a Form Builder aspect, the Form Builder widget or the Form View Aggregator widget. For details, see Make a Form Builder form read only.

For more about display rules, see Striping an Aspect.

Form Builder aspects on child work types

A new child work type doesn't receive the aspects of its parent type automatically, so its key facts blade starts empty. To reuse the parent's aspects, including Form Builder aspects, open the child type in Modeller, select Aspects, then select Copy from Parent.

Copied aspects stay linked to the parent type:

  • The Aspects Editor displays each linked aspect in grey, with (inherited from and the name of the parent type.
  • You can't change the settings or display rules of a linked aspect on the child type.
  • To change a linked aspect for the child type only, select the Override button (down arrow) on the aspect.
  • When you save the aspects of a work type that has child types, you can also apply the changes to the child types.
 
 

Data, reporting and audit

  • Database changes: you don't need to make any. Clio Operate stores the answers when you configure the fields in Form Builder.
  • Reporting: fields that you add with Form Builder flow into the reporting database automatically.
  • Audit: Clio Operate records changes to Form Builder fields in the audit history by default. Changes on a work item's form go to the work item's audit history. Changes on a participant or ODS entity form go to the audit history of that person, organisation or team.
  • Chronology: to add a field's changes to the work item's chronology, set chronologyCard to true on the field. Only fields with this attribute create chronology entries. Forms on a work item and forms on its participants can create chronology entries. Forms on an ODS entity can't, because they aren't linked to a work item.

Capturing Custom Data Changes in Chronology (Form Builder)

 
 

Configure fields

Snippets

Form Builder comes with a snippet for each field type. Each snippet is an example field definition that shows the attributes available for that type.

Every snippet includes an example visibleIf attribute. If you don't want to display the field conditionally, remove visibleIf from the snippet. Otherwise, the field displays only when the example condition matches. For more information, see Writing expressions using Form Builder visibleIf.

 

Properties on every field

Each field definition has these properties, outside the attributes object:

Property Type Description
name string The field's system name. Clio Operate saves the answer against this name. See Field names are shared within a record.
title string The label that displays next to the field.
description string Help text for the field. Optional.
type number The field type. Copy it from the snippet.
required boolean If true, the user must fill in the field. To require it only in some phases, see Make a field required only in some phases.
readonly boolean If true, the user can see the field but can't change it.

Attributes that most field types support

These attributes go in the field's attributes object. They work on most field types. Labels and headers display text only, so they support visibleIf and their own text attributes.

Attribute Type Description
visibleIf string Displays the field only when a condition matches. See visibleIf syntax.
chronologyCard boolean If true, changes to the field create chronology entries. Default false.
cssClass string One or more CSS class names to add to the field, for example "alpaca-indent".
default depends on the field type The value that the field starts with when nothing has been saved yet, for example true for a check box.
requiredOnlyInPhases string A comma-separated list of phase system names. Works only when required is true. See Make a field required only in some phases.
focus boolean If true, the cursor goes to this field when the form opens. Works on Text, Integer, Currency, Date, DateTime, Percentage, Decimal and Memo fields.

visibleIf syntax

  • Simple: fieldName1=value1,fieldName2=value2. The field displays when all the conditions match. If the same field appears more than once, any of its values can match.
  • Expression: :[Field1=5013314] AND ([Field2=true] OR [Field3=foo]). Start with :, put each condition in square brackets, and put a space on each side of AND and OR. Expressions work on fields only, not on sections.

= is the only operator. Field names and values must match exactly, including upper and lower case. AND and OR work in any case, for example and. For the full rules, see Writing expressions using Form Builder visibleIf.

Make a field required only in some phases

To require a field in some phases only, set two things on the field:

  1. Set required to true.
  2. In attributes, set requiredOnlyInPhases to the phase system names, separated by commas.

The field is then required only when the work item is in one of the listed phases. The attribute has no effect if required is false. When a user creates a new work item, the field isn't required yet, because the work item doesn't have a phase.

Use tokens in attribute values

In a Form Builder aspect, you can put a token in an attribute value, for example in the endpointUri of an API Picker. Clio Operate replaces the token with a value from the current record or the current user when the form opens.

Token Replaced with
[[token:sharedoId]] The ID of the work item that the form is on.
[[token:sharedoTypeSystemName]] The system name of the work item's type.
[[context:user.username]] A value from the current page context. In this example, the current user's username.

Clio Operate replaces only the first token in each value. If a value contains two tokens, the second token stays as plain text.

Field types

Select a field type to see what it does and the attributes that it supports. Each type also supports the attributes in Attributes that most field types support, unless its section says otherwise.

API Picker

Displays a drop-down list of values that an API endpoint returns. The endpoint can be part of Clio Operate or of a Clio Operate plugin. The field works like the Option Set Picker, but the values come from the API.

Attribute Type Default Description
endpointUri string none The URL of the endpoint, for example /api/endpoint. Can contain a token, for example [[token:sharedoId]].
allowNoSelection boolean false If true, the list includes a None option.
placeholderText string none The label of the None option.
multiple boolean false If true, the user can select more than one value.
hideIfNoData boolean false If true, the field is hidden when the endpoint returns no content (HTTP 204) or null. An empty list ([]) doesn't hide the field.

The endpoint must return a JSON array in this format:

[
  { "text": "Item One", "value": "1" },
  { "text": "Item Two", "value": "2" }
]
  • text: the text that the user sees for the item.
  • value: the identifier that Clio Operate saves for the item. Each value must be unique.

To see a working example, set endpointUri to /api/lists/00000000-0000-0000-0000-000000000000/test-list-countries?format=alpaca. This endpoint returns a list of countries. It works only on environments that have the default demo data installed.

Boolean

Adds a check box to the form.

The Boolean field has no attributes of its own. To tick the check box by default, set default to true.

Currency

Displays a currency field.

Attribute Type Default Description
allowEmpty boolean false If true, the user can leave the field empty.
allowPositive boolean true If false, the user can't enter a positive amount.
allowPositiveMsg string "Can not be a positive value." The message that displays when a positive amount isn't allowed.
allowNegative boolean false If true, the user can enter a negative amount.
allowNegativeMsg string "Can not be a negative value." The message that displays when a negative amount isn't allowed.
overrideCurrencyCode string the work item's currency An ISO 4217 currency code, for example GBP or USD. Without this attribute, the field uses the currency of the work item. On a new work item, it uses the system's default currency.
Date

Displays a calendar date picker.

Attribute Type Default Description
displayFormat string none The format that the date displays in, as a Moment.js format, for example "DD/MM/YYYY".

Common format tokens: YYYY (year), MM (month), DD (day), HH (hour, 24-hour clock), mm (minutes), ss (seconds). For the full list, see Moment.js format.

In versions before 7.6, the format attribute set the date format, and only ISO 8601 dates (YYYY/MM/DD) worked. Use displayFormat instead. For more information, see the Form builder data/time field enhancement section of the v7.6.0 release notes.

DateTime

Displays a calendar and a clock, so that the user can pick a date and a time.

Attribute Type Default Description
displayFormat string none The format that the date and time display in, as a Moment.js format, for example "DD/MM/YYYY HH:mm".

The format tokens and the note on versions before 7.6 are the same as for the Date field.

Decimal

Displays a decimal number field.

Attribute Type Default Description
precision integer 0 The number of decimal places.
minValue integer no minimum The lowest value that the user can enter.
maxValue integer no maximum The highest value that the user can enter.
Header

Adds heading text to the form. A header displays text only, so it supports visibleIf and the attributes below.

Attribute Type Default Description
labelText string none The heading text. Can contain simple HTML formatting, for example <b>. Clio Operate removes scripts and other unsafe HTML.
cssClasses string none One or more CSS class names, separated by commas.
elementType string "h2" The HTML heading level: "h1", "h2", "h3", "h4", "h5" or "h6".
Icon Picker

Displays a field where the user picks an icon. The Icon Picker has no attributes of its own.

Integer

Displays a whole number field.

Attribute Type Default Description
minValue integer no minimum The lowest value that the user can enter.
maxValue integer no maximum The highest value that the user can enter.
Label

Adds text to the form. A label displays text only, so it supports visibleIf and the attributes below.

Attribute Type Default Description
labelText string none The label text. Can contain simple HTML formatting, for example <b>. Clio Operate removes scripts and other unsafe HTML.
cssClasses string none One or more CSS class names, separated by commas.
Memo

Displays a text field with several lines.

Attribute Type Default Description
rows integer 5 The number of lines that the field displays when the form opens.
richText boolean true If true, the user can format the text.
maxLength integer no limit The maximum number of characters.
showMaxLengthIndicator boolean false If true, the field displays how many characters the user can still enter.
ODS Entity Picker

Displays a picker for ODS entities in one participant role. The picker adds each entity that the user selects to the work item as a participant in that role. It doesn't save a form answer.

You must set roleSystemName. Without it, the field fails to load. The snippet for this field doesn't include chronologyCard.

Attribute Type Default Description
roleSystemName string none The system name of the participant role. Required.
multiple boolean false If true, the user can select more than one entity.
showSearch boolean false If true, the user can search for an entity. Same as Can search on the ODS Entity Picker aspect.
showInlineSearch boolean false If true, the user can search inside the field. Same as Inline search on the ODS Entity Picker aspect.
searchRelated boolean false If true, the search can include related participants, if the role's sourcing allows it. Same as Related participants on the ODS Entity Picker aspect.
Option Set Picker

Displays a drop-down list of the values in an option set.

Attribute Type Default Description
optionSetName string none The system name of the option set.
allowNoSelection boolean false If true, the list includes a None option.
placeholderText string none The label of the None option.
multiple boolean false If true, the user can select more than one value.
showSelectedColour boolean false If true, the field displays the colour of the selected value.
showSelectedIcon boolean false If true, the field displays the icon of the selected value.
  • Inactive values: the list doesn't include inactive values. If a record already has an inactive value saved, the list includes that value with (Inactive) after its name.
  • visibleIf on another field: the field saves the ID of the selected value, not its name. If another field's visibleIf depends on this field, use the value's ID in the condition.
Participant Picker

Displays a picker for the participants of the work item.

Attribute Type Default Description
roleSystemNames string none The system names of the participant roles to list, separated by commas.
excludeRoleSystemNames string none The system names of participant roles to leave out of the list, separated by commas.
multiple boolean false If true, the user can select more than one participant.
includeAncestors boolean false If true, the list includes participants of parent work items. For example, a task lists the participants of its matter.
includeAncestorTypePaths string none Limits the parent work items to these type paths, for example "/matter/,/proceeding/".
allowParticipantAdd boolean false If true, the user can add a participant from the field.
autoSelectSingleParticipant boolean false If true and only one participant is available, the field selects that participant. Works only when multiple is false.
Percentage

Displays a percentage field.

Attribute Type Default Description
precision integer 0 The number of decimal places.
minValue integer no minimum The lowest value that the user can enter.
maxValue integer no maximum The highest value that the user can enter.
Section

Adds a section to the form. A section groups fields under a heading. It supports visibleIf and chronologyCard.

Some rules apply to visibleIf on a section:

  • A section supports simple conditions only. An expression that starts with : never displays the section.
  • Don't list the same field more than once. If you do, the whole form fails to load and the user sees an error.
  • A field inside a section can't use a field outside the section in its own visibleIf.
Text

Displays a single-line text field.

Attribute Type Default Description
placeholder string none Text that displays in the empty field.
maxLength integer no limit The maximum number of characters.
pattern string none A regular expression that the text must match, for example "^[A-Z]+$".
patternErrorMsg string none The message that displays when the text doesn't match pattern. Needs showMessages.
validateUnique boolean false If true, the user can't enter a value that is already saved in a field with the same name on any other record.
uniqueErrorMsg string none The message that displays when the value isn't unique. Needs showMessages.
requiredErrorMsg string none The message that displays when a required field is empty. Needs showMessages.
showMessages boolean false If true, the field displays your custom error messages. If false, it displays the standard messages.
Toggle

Displays a toggle button.

Attribute Type Default Description
dataOn string "Yes" The text that displays when the toggle is on.
dataOff string "No" The text that displays when the toggle is off.
buttonWidth string automatic The width of the button as a CSS value, for example "100px".
buttonHeight string automatic The height of the button as a CSS value.

To switch the toggle on by default, set default to true.

Tree Selector

Displays the values of a hierarchical option set as a tree.

Attribute Type Default Description
optionSetName string none The system name of the option set.
multiple boolean false If true, the user can select more than one value.
selectMode string "LeafOnly" "LeafOnly" lets the user select only values at the end of a branch. Any other value, for example "Any", lets the user select any value.
displayMode string "Single" "Full" displays the full path of the selected value, for example Parent > Child > Leaf. "Single" displays only the selected value. Use one of the two values. The snippet shows "Single|Full" to list both options.
placeholderText string none Text that displays when nothing is selected.
Unit of Measure

Displays a drop-down list of the units of measure of one type, for example weight.

Attribute Type Default Description
unitOfMeasureType string none The system name of the unit of measure type, for example "weight".
allowNoSelection boolean false If true, the list includes a None option.
placeholderText string none The label of the None option.
multiple boolean false If true, the user can select more than one unit.

The list displays each unit's code, for example gm and kg, not its name. Only enabled units of measure are listed.

 
 

Was this article helpful?

Related articles

Related articles in the knowledge base