문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top