#101768TYPO3 Form - Page Variant Condition
Description
Bug in the description of cms-form
Page: https://docs.typo3.org/c/typo3/cms-form/main/en-us/I/Concepts/Variants/Index.html#hide-steps
Variant conditions for page types must have an additional condition, if formValues are checked. Else the condition will fail because the array key is not set yet.
Before:
type: Page
identifier: page-2
label: Second step
variants:
-
identifier: variant-2
condition: 'formValues["checkbox-1"] == 1'
renderingOptions:
enabled: false
Fixed:
type: Page
identifier: page-2
label: Second step
variants:
-
identifier: variant-2
condition: 'formValues && formValues["checkbox-1"] == 1'
renderingOptions:
enabled: falseReviews 2
History 57
-
Dennis Leibold changed description 08/28/23, 10:02
-
Mathias Brodala commented 09/28/23, 07:57
-
Henrik Elsner commented 12/14/23, 12:47
IMHO Mathias already provided the solution.
No patch is needed for the core, but the docs.
I created a PR, which might already be enough at this point.
https://github.com/TYPO3/typo3/pull/473 -
Gerrit Code Review pushed patch set 3 for main to change 82186 status
NewUnder Review 12/15/23, 22:33 -
Gerrit Code Review pushed patch set 1 for 12.4 to change 82128 12/18/23, 10:18
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % 12/18/23, 10:35Applied in changeset commit:38063d6e38e6c2a16cee6056b7d0a9665199cb31.
-
Benni Mack changed status
ResolvedClosed 07/09/24, 15:19
You can use the known
traverse()function: