The lifecycle of a form

What is a form’s lifecycle?

A form should not be something that you cobble up and then forget about. In reality, a form and its associated data can go through several phases, part of what we call the lifecycle of a form. Properly handling these phases is particularly important when you have to handle large numbers of complex forms.

This applies to forms proper (called form definition in Orbeon Forms). Form definitions are the realm of form authors and administrators, and can go through the following phases:

  • Form Design: The form is created, typically using a form builder.
  • Form Testing: The form is tested to ensure it works as expected.
  • Form Publishing: The form is made available to users.
  • Form Revising: The form is revised and versioned to adapt to changing requirements.
  • Form Monitoring: The form is administered and monitored over time.
  • Form Archiving: The form is archived for future reference.

This also applies to form data, which can go through the following phases:

  • Data Capture: Users fill out the form.
  • Data Validation: The data is validated to ensure it meets certain criteria.
  • Data Submission: The data is saved or submitted to a backend system.
  • Data Processing: The data is processed, typically by a backend system.
  • Data Archiving and deletion: The data is archived for future reference or deleted for space or compliance.
Lifecycle of a form
Lifecycle of a form
Lifecycle of form data
Lifecycle of form data

Orbeon Forms can help you with most of these phases of the forms lifecycle. The rest of this page goes into more details.

Lifecycle of form definitions

Form Design

Form Builder allows you to create forms visually, without writing code. You can create forms with a wide range of controls, including text fields, date pickers, dropdowns, and more. You can also create forms with multiple pages, sections, and tabs.

Form Testing

Form Builder allows you to test a form directly in the browser.

Form Testing
Form Testing

In addition, the Form Runner Admin page allows you to handle system with multiple environments. This allows you to publish a form:

  • locally in a development environment
  • then push it to a staging environment
  • and finally push it to a production environment

For details, see Remote operations.

Form Publishing

Orbeon Forms makes a clear distinction between unpublished forms and published forms:

  • Unpublished forms: These forms are only visible to form authors.
  • Published forms: These forms are visible to users who have access to them in a given environment.

In addition, a published form can be:

  • Made unavailable to users, temporarily or permanently.
  • Made available to users again.
  • Made available to users during a certain period of time (“Time Window”).
  • Completely deleted.
Publishing
Publishing

See also Form publishing.

Form Access Permissions

Orbeon Forms allows you to grant access rights to users to create, view, edit, or delete form data based on their roles.

Access Permissions
Access Permissions

In addition, Orbeon Forms lets you optionally share access to forms using a URL and a token, without requiring users to log in.

Form Revisions

Once a form is published, it is rare that the form doesn’t need any further modifications and updates over time. Orbeon Forms supports various types of changes:

  1. simple changes, such as changing or fixing a form label, or adding a language
  2. adding or moving form controls
  3. making more complex changes

In the first case, published forms can be updated in place.

In the second case, Orbeon Forms supports Simple Data Migration, which allows data already captured with a form to be read by the modified version of the form.

In the third case, Orbeon Forms supports Form Versioning, which consists in making explicitly different versions of a form available to users. This allows users to continue to fill out forms based on the previous version, while new users fill out the new version.

All these tools allow you to handle changes to a form over time.

Form Administration

In addition to all of the above, Orbeon Forms provides two views which allow you to manage forms:

  1. The Form Runner Published Forms view, which allows you to see all forms available to users in a given environment.
  2. The Form Runner Admin view, which allows you to see all forms and to perform administrative tasks on them.
Form Runner Admin
Form Runner Admin

Both of these views are able to handle a large number of forms, thanks to searching and filtering capabilities.[^2024.1]

Lifecycle of form data

Data Capture

With a published form, to which a given user has access, data capture can start. With Orbeon Forms, there are two main types of data:

  • Data coming from form fields, dropdowns, radio buttons, etc.
  • Attachments, such as images, video, and general file attachments.
Data Capture
Data Capture

Capturing data is not just about presenting forms. Orbeon Forms also supports the following essential features:

  • Accessibility. Orbeon Forms also strives to use accessible markup and supports screen readers. For more, see Accessible Forms
  • Localization. Orbeon Forms lets you show forms in multiple languages. All form labels, hints, and error messages can be translated in Form Builder, and the end user can choose the language best suited for them. For more, see Form localization.
Adding a language to a form
Adding a language to a form

Orbeon Forms supports importing data from Excel files. This is useful when you have a large amount of data to enter, or when you want to import data from another system.

Excel Import User Interface
Excel Import User Interface

Orbeon Forms lets you embed forms in multiple ways, including:

  • from Java applications
  • from any application using a JavaScript API, including React and Angular components

For more, see Linking and embedding.

Orbeon Forms lets you capture data from desktop, tablet, and mobile devices.

Data Validation

All form fields and attachments in Orbeon Forms support validation. This includes:

  • Required fields
  • Data types (such as integers, dates, etc.)
  • Regular expressions
  • Maximum length of a field, attachment size, etc.
  • Sanitization of rich text input (HTML).

All data validation is eventually performed on the server, ensuring that your data is clean and validations cannot be circumvented. This is an important security feature.

Data Validation
Data Validation

Data Submission

Orbeon Forms supports saving data to a relational database (PostgreSQL, MySQL, Oracle, SQL Server, DB/2, and even SQLite), or, if you implement one, to a custom persistence provider. You can optionally store attachments separately to the filesystem. Data and attachments saved this way can later be read back and modified by users with permissions.

Orbeon Forms persistence architecture
Orbeon Forms persistence architecture

Orbeon Forms also allows you to send data and attachments to an external service, either:

  • in conjunction with the Orbeon Forms database
  • or without storing the data in the Orbeon Forms database.

As part of data submission, Orbeon Forms provides access to simple processes, which allow you to configure how you want submission to happen, including:

  • validate the data
  • then save it to the relational database
  • then send an email with the PDF file as attachment
  • then send it to a service

For more, see Buttons and processes.

Orbeon Forms also allows you to export or send form data as a PDF file. Here are examples of an invoice PDF automatically generated by Orbeon Forms, as well as a PDF template filled by Orbeon Forms:

PDF Production
PDF Production

For more, see the blog post and associated documentation.

Data Processing

It is important for the data that you collect to be accessible. Orbeon Forms stores data in a relational database, and also offers APIs to search and access form data. A set of relational views are also available to help you query form data.

In addition, data can often be processed directly within Orbeon Forms. For example, an assessor can review a form and approve or reject it. This is possible thanks to the notion of workflow stage in conjunction with user roles and permissions.

Example of workflow
Example of workflow

The Orbeon Forms Summary page allows you to view, sort, and search, and even bulk edit saved data.

Summary Page
Summary Page

With Form Definitions and Form Data

Archiving and Deletion

Orbeon Forms has several export features which allow you to export or archive form definitions as well as form data.

  • Excel export: you can export a form definition to an Excel file, as well as a form Summary page’s data view.
  • Bulk export: you can export all or a subset of in-progress or published form definitions to a ZIP file.
Bulk Export User Interface
Bulk Export User Interface

Here is an example of Excel export:

Summary Page Excel Export
Summary Page Excel Export

Conversely to the data archiving, you can delete or purge form definitions, data, and attachments.

Security

Orbeon Forms supports a wide range of security features, including:

  • preventing buffer overflows
  • preventing cross-site scripting
  • authenticating users
  • preventing data injection

For more, see Security.

Next steps

Here is what you can do next: