m.makos
m.makos

Reputation: 85

Orbeon forms - customize section repetitions by expression

I have a text filed X. If X field is empty I want to set section Y repetitions to 1. If X field is not empty I want to set section Y repetitions from 0 to 1. I tried to customize it in section repetitions like this:

enter image description here

Link to form: https://demo.orbeon.com/demo/fr/orbeon/builder/edit/485d30b47d4f7a5f7dde7674b4d53eeb5a390436

Expected behaviour:

Is it possible to do that in Orbeon?

Upvotes: 0

Views: 118

Answers (1)

avernet
avernet

Reputation: 31743

Currently, the min/max setting for repeated content for repeated grids or repeated sections impacts the user's ability to add/remove rows/sections, but not the validity of the form should the number of rows/sections be below the minimum or above the maximum. This is covered by RFE #4567.

While what you suggest might be possible in the future, I think it is better, for usability, to handle this in a more explicit way:

  1. Have a checkbox (e.g. "Provide additional information"), which is only shown if the text field isn't empty.
  2. Create a non-repeated section, and set it to be visible if the field is empty or the checkbox is checked.

Upvotes: 1

Related Questions