Bug #101768
closedTYPO3 Form - Page Variant Condition
100%
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: false
Updated by Mathias Brodala 11 months ago
You can use the known traverse()
function:
condition: 'traverse(formValues, "checkbox-1") == 1'
Updated by Henrik Elsner 8 months ago
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
Updated by Gerrit Code Review 8 months ago
- Status changed from New to Under Review
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82186
Updated by Gerrit Code Review 8 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82128
Updated by Anonymous 8 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 38063d6e38e6c2a16cee6056b7d0a9665199cb31.