Monday, April 13, 2020

Dynamic loading of closed sections

In many cases, Orbeon Forms users choose to deploy forms that contain multiple sections using the wizard view. With that view, each section appears one after the other, so that the user typically navigates through steps to complete the form. Orbeon Forms features several validation modes, including "free", where the user can navigate freely between wizard sections, and "strict', where the user must fully complete a section before going to the next.

To improve performance, since Orbeon Forms 2018.1, each wizard page loads dynamically. So if you have a form with 20 pages (or sections), only one of them is present in your browser at a time.

But what about forms that don't use the wizard view? In this case, form sections appear on top of each other on a single web page. If all sections are open, there is not much we can do to reduce the size of the page to show the user. But sometimes, sections or subsections are initially closed.

Form with closed sections
You can configure this behavior in Form Builder by deselecting the "Initially Open" checkbox. (You can also explicitly make the section collapsible, although the default, configured by properties, also works unless you changed those properties in properties-local.xml.)

Controlling whether a section is initially open or closed
With Orbeon Forms 2019.2, we apply the same performance optimization we did to the wizard view: all sections and subsections that are initially closed load their content dynamically (or lazily) as the user opens them. This can help page loading times and performance in the browser, as there is less HTML markup to send and process on the client, especially when there is a large number of sections.

We hope you'll like this enhancement!

No comments:

Post a Comment