Question

I am using Orbeon Form Builder and have a form with a repeat section, containing a field named address as well as some other fields.

There can be a minimum of 4 repeats and a maximum of 6.

Is there a way to add a constraint on the repeating address field to make it mandatory unless it is the last item?

Était-ce utile?

La solution

Say your repeat grid name is address (this is the name of the repeat grid, not the field). Then on the field you can use the following constraint:

empty(../following-sibling::address) or . != ''

Essentially, you're saying that this field is always valid if there are no following address iterations (which means we're on the last line), and other its value must be non-empty.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top