Thursday, June 13, 2019

Freezing rows in repeated grids or sections

Repeated grids and sections in Orbeon Forms are already quite flexible. With Orbeon Forms 2018.2, we added a new option to allow making a number of repetitions frozen.

Repeated grids and sections usually work as follows:
  • At design time, the form author:
    • creates a repeated grid or section and adds controls within it.
    • specifies a minimum and/or a maximum number of allowed repetitions (there might be no minimum or maximum).
    • specifies a number of initial repetitions.
  • At runtime:
    • Users can add, remove, or reorganize the repetitions.
    • Optionally, the grids can be populated by services.
In some cases, some repetitions must not be allowed to be removed or reorganized. This is what this new feature is about: freezing the first N iterations of a repeated grid or section.

You enable this simply by selecting the "One repetition" or "Other" radio buttons in the "Repeated Content" tab of the "Section/Grid Settings" dialog.

Repeated Content Settings
The number of frozen iterations must be at most the minimal number of iterations. If that's not the case, the number of frozen iterations will be set to the minimal number of iterations.

At runtime, the user can still enter information in the frozen rows, unless form controls are specifically marked as readonly. But the repetitions cannot be moved or removed.

Repeated grid with two frozen repetitions
In the example above, the user cannot insert a new repetition between the first two repetitions. The menu for the first frozen repetition is not even shown.

For more, see the documentation. We hope you will enjoy this Orbeon Forms 2018.2 feature.

No comments:

Post a Comment