Form fields and validation

Look up which field type to choose when you add a field in the Orchestra form builder, what the person filling in the form sees, and which rules you can set. For an introduction to forms, see How forms work.

How a field is organised

To add a field, click the button for its field type under Add field. Each field appears as a block with the label at the top. A choice field also has the Set up options button there. Below that are three tabs: Extra options, Rules and Advanced.

Almost every field type has the settings in the table below. What differs per type is listed under Field types.

A field block in the form builder with the label Onderwerp and the Rules tab open: Required, Minimum number of characters, Maximum number of characters and a pattern.
SettingWhereWhat it does
LabelAt the top of the blockThe name the person filling in the form sees next to the field. A label is required.
Example text in the fieldExtra optionsExample text shown in the empty field. For text, number and amount fields.
Base valueExtra optionsThe value that's already filled in when the form opens.
Extra information for the userExtra optionsHelp text for the field, with formatting.
Width of the fieldExtra optionsFull, Half or Narrow. On a phone, every field is full width.
SectionExtra optionsConsecutive fields with the same section name are grouped in one collapsible block. The section name is the heading of that block.
Only show ifExtra optionsOnly shows the field when another field has a certain value. Leave it empty to always show the field. See below.
RequiredRulesThe form can't be submitted while the field is empty. You also enter the message the person sees in that case.
Field nameAdvancedThe fixed name of the field, created by Odigos. The data structure stores the value under this name.

Only show if

Write the condition as a short rule, for example {"var":"fieldname","equals":"Yes"}. For var, enter the Field name of the field this field depends on. Use equals for one value and in for a list of values, for example {"var":"fieldname","in":["Yes","Maybe"]}. Add "behavior":"hide" to hide the field for that value instead.

A hidden field stays empty, and Required doesn't apply to it. If the condition refers to a field that isn't in this form, the form isn't saved.

Field types

These are the field types under Add field, named as they appear on the buttons. The most common types come first, followed by the rest. The last column lists only the settings a type has on top of the standard ones.

The buttons under Add field in the form builder, from Short text input to Repeating sub-form.

Common field types

Field typeWhat the person filling in the form seesExtra settings and rules
Short text inputOne line of text, for names and short answers.Rules: Minimum number of characters, Maximum number of characters and a pattern. Each rule has its own message.
Long text inputA multi-line text box, for explanations.Same rules as Short text input.
Email inputOne line of text. The browser checks that it's an email address.Same rules as Short text input. If the address isn't valid, the person sees Invalid email address.
Number with decimalsA number field, for quantities.Extra options: Step size for the field, 1 by default. Rules: Lowest value and Highest value.
AmountA field for an amount in euros.Rules: Minimum amount and Maximum amount.
Yes/no (checkbox)A checkbox, for example to give consent.Extra options: Label position, above or to the right of the field.
DropdownA drop-down list where the person picks one option.Set up options. Text when nothing is chosen: if you leave it empty, the field shows -- not specified --.
Radio buttonsOne radio button per option, with all options visible.Set up options. Extra options: Display of the options, side by side or stacked.
DateDrop-down lists for day, month and year.Extra options: Use the current date as default value.
File(s)A field for uploading one or more files.Accessibility of uploaded files: Public or Private. Set the number, size, types and folder on the data structure field, using Change this in the data model.

Other field types

Field typeWhat the person filling in the form seesExtra settings and rules
Password inputA field that hides the characters you type.Same rules as Short text input. No base value.
Formatted textA text box with formatting buttons, such as bold and lists.Extra options: Button set. The default is Simple.
Dropdown with searchA drop-down list with a search field, for a long list.Same as Dropdown.
Choice groupOne button per option, for a few short options.Set up options.
Date and timeDrop-down lists for day, month, year, hour and minutes.Same as Date.
Date (calendar)The browser's date picker.Same as Date.
Color pickerA colour picker.No extra settings.
Mail templateCards with the mail templates that match the record. The person picks one.Once a template is chosen, the field fills in the subject, text and sender from it. To make this work, link the field to the subject, text and sender fields in the same form.
Static text (explanation)Text only, with no input field.Information to show: the text itself. No label, no rules and no saved data.
Repeating sub-formA block in which the person adds rows with a button, such as participants or products.Sub-form for structure and Reference field to this form. Each row becomes a separate record in that data structure. This works for a new submission. When an existing record is updated, Odigos rejects the submission so that no rows are lost.

Choice field options

Dropdown, Dropdown with search, Radio buttons and Choice group get their options through Set up options. There you choose where the options come from.

ChoiceWhere the options come from
Set options manuallyYou type the options yourself. For each option, enter the label the person sees on the left and the value that is saved on the right.
Linked existing listThe options come from an existing cross-section, which you choose with Link to existing cross-section. You edit the options themselves in Dossier.
Create a new selectionChoose a data structure that is kept in Dossier and create a new cross-section from it.
Filtered on another fieldThe options depend on what the person chooses in another field. Set Filter on the value of this field, Get the options from list and Filter on this field in the list.
Field of the task recordFor each task, the choices come from the record that the task belongs to. Enter the text field that holds the choices, one per line.

You can choose the source of the options only once. After that you can't change it, and you can no longer edit manually set options in the form builder. So decide which list you need before you start.

Where the rules are checked

The browser checks all rules before the form is submitted. If something isn't right, the person filling in the form sees the message you set.

When the form is submitted, Odigos checks some of the rules again, so nobody can get around them by submitting outside the browser:

  • required fields that are empty
  • a choice that isn't in the fixed list of options
  • a number or amount below the minimum or above the maximum
  • a value in a field that should be hidden

If the data structure keeps its data in Dossier, the rules of the data structure itself also apply when the data is saved. See Table logic and validation.

See also