Flexform fields of first sheet with displayCond and multiple sheets will not be displayed
I have a FlexForm with two sheets.
First sheet has some fields with a given displayCond to another field which as also on first page.
I have checked it multiple times, the values are equal, but the field will not be displayed.
The problem is in EvaluateDisplayConditions::removeFlexformFields()
On first loop over the first sheet, the $result is OK.
On second loop over the second sheet, it has only the field values of second sheet, but it validates the displayConds of first sheet again. With no data for first sheet all conditions of first sheet will now be FALSE.
We have to stop the duplicated validation.
I have an idea where to solve that and will push a patch now.
[BUGFIX] FormEngine: Only evaluate Flexform display conditions once
Avoid evaluating the display conditions for fields on a Flexform sheet
more than once. Multiple evaluations of the same conditions can lead to
wrong result due to fields having been removed by the first evaluation.
Reviewed-by: Morton Jonuschat <email@example.com>
Tested-by: Morton Jonuschat <firstname.lastname@example.org>
Reviewed-by: Christian Kuhn <email@example.com>
Tested-by: Christian Kuhn <firstname.lastname@example.org>