#102055Form runtime next/previous page ignores variants
Description
Given a form with conditional pages variants are not respected when the navigation is built. Example:
type: Form
prototypeName: standard
identifier: multi-step-form
label: Muli step form
renderables:
-
type: Page
identifier: page-1
label: First step
renderables:
-
type: Checkbox
identifier: checkbox-1
label: Check this and the 2nd step will be skipped
-
type: Page
identifier: page-2
label: Second step
renderingOptions:
enabled: false
variants:
-
identifier: variant-2
condition: 'traverse(formValues, "checkbox-1") == 0'
renderingOptions:
enabled: true
-
type: Page
identifier: page-3
label: Third step
renderingOptions:
enabled: false
variants:
-
identifier: variant-2
condition: 'traverse(formValues, "checkbox-1") == 1'
renderingOptions:
enabled: true
Enabling the checkbox on the 1st page and going to the next page will show the 3rd page and a “Submit” button.
Not enabling the checkbox on the 1st page and going to the next page will show the 2nd page and a “Next Page” button. However, there is no next page here. In this case the button should also say “Submit”.
The example above generally disables all subsequent pages and conditionally enables them which is a logical approach IMO. Especially because it allows you to have conditions which match their page 1:1. The reverse logic as suggested by the docs also doesn’t work however:
type: Form
prototypeName: standard
identifier: multi-step-form
label: Muli step form
renderables:
-
type: Page
identifier: page-1
label: First step
renderables:
-
type: Checkbox
identifier: checkbox-1
label: Check this and the 2nd step will be skipped
-
type: Page
identifier: page-2
label: Second step
variants:
-
identifier: variant-2
condition: 'traverse(formValues, "checkbox-1") == 1'
renderingOptions:
enabled: false
-
type: Page
identifier: page-3
label: Third step
variants:
-
identifier: variant-2
condition: 'traverse(formValues, "checkbox-1") == 0'
renderingOptions:
enabled: falseReviews 2
History 818
-
Mathias Brodala changed description <span data-processor="relativetime" data-value="2023-09-28T08:10:11+00:00" > 09/28/23, 08:10 </span>
-
Mathias Brodala changed description <span data-processor="relativetime" data-value="2023-09-28T08:10:27+00:00" > 09/28/23, 08:10 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 81271 status
NewUnder Review <span data-processor="relativetime" data-value="2023-09-28T08:47:50+00:00" > 09/28/23, 08:47 </span> -
Mathias Brodala changed description status
Under ReviewNew <span data-processor="relativetime" data-value="2023-09-28T09:04:48+00:00" > 09/28/23, 09:04 </span> -
Mathias Brodala changed description <span data-processor="relativetime" data-value="2023-09-28T09:05:27+00:00" > 09/28/23, 09:05 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 81271 status
NewUnder Review <span data-processor="relativetime" data-value="2023-10-04T10:50:48+00:00" > 10/04/23, 10:50 </span> -
Mathias Brodala commented <span data-processor="relativetime" data-value="2023-11-01T10:30:01+00:00" > 11/01/23, 10:30 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 81271 <span data-processor="relativetime" data-value="2024-10-18T14:09:43+00:00" > 10/18/24, 14:09 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 81271 <span data-processor="relativetime" data-value="2025-03-25T09:02:32+00:00" > 03/25/25, 09:02 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 81271 <span data-processor="relativetime" data-value="2026-03-07T09:59:25+00:00" > 03/07/26, 09:59 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 81271 <span data-processor="relativetime" data-value="2026-03-07T09:59:59+00:00" > 03/07/26, 09:59 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 81271 <span data-processor="relativetime" data-value="2026-03-07T10:45:22+00:00" > 03/07/26, 10:45 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 81271 <span data-processor="relativetime" data-value="2026-03-11T20:32:22+00:00" > 03/11/26, 20:32 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 93154 <span data-processor="relativetime" data-value="2026-03-12T06:19:54+00:00" > 03/12/26, 06:19 </span>
-
Mathias Brodala commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-03-12T07:00:09+00:00" > 03/12/26, 07:00 </span>Applied in changeset commit:d88a11d681bd83b5eea511c7890e4050d19770af.
-
Gerrit Code Review pushed patch set 2 for 13.4 to change 93154 status
ResolvedUnder Review <span data-processor="relativetime" data-value="2026-03-12T07:15:34+00:00" > 03/12/26, 07:15 </span> -
Mathias Brodala commented and changed status
Under ReviewResolved <span data-processor="relativetime" data-value="2026-03-12T08:00:08+00:00" > 03/12/26, 08:00 </span>Applied in changeset commit:698a713e219d5db40d1d362a7d239512c0cbf9aa.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-03-31T09:00:36+00:00" > 03/31/26, 09:00 </span>
Just noticed that the given example is bad since you always end up at the 3rd page with “Submit” then. Here is a better example:
Without the fix, having the checkbox enabled will lead to “Next page” on the 2nd page as last step.
With the fix it will say “Submit” on the 2nd page instead since there is no 3rd page.