Issue Bug Closed

#45791FlexForms: "displayCond" does not work with default-Values

Lars no-lastname-given 02/24/13, 12:39 updated 11/01/15, 02:11

Description

If you use a flexform element with da display condition, which checks a value from a other element, the default value of the checked field will not be respected.

Example:

<T3DataStructure>
<sheets>
    <sDEF>
        <ROOT>
            <TCEforms>
                <sheetTitle>Settings</sheetTitle>
            </TCEforms>
            <type>array</type>
            <el>
                <what_to_display>
                    <TCEforms>
                        <label>What to display</label>
                        <onChange>reload</onChange>
                        <config>
                            <type>select</type>
                            <default>list</default>
                            <items>
                                <numIndex index="0">
                                    <numIndex index="0">Single-View</numIndex>
                                    <numIndex index="1">single</numIndex>
                                </numIndex>
                                <numIndex index="1">
                                    <numIndex index="0">List-View</numIndex>
                                    <numIndex index="1">list</numIndex>
                                </numIndex>
                            </items>
                        </config>
                    </TCEforms>
                </what_to_display>

                <bodytext>
                    <TCEforms>
                        <label>TEXT</label>
                        <displayCond>FIELD:what_to_display:=:list</displayCond>
                        <config>
                            <type>input</type>
                        </config>
                    </TCEforms>
                </bodytext>
            </el>
        </ROOT>
    </sDEF>
</sheets>
</T3DataStructure>

The select-field has default value “list”, the right option is pre-selected, but the bodytext-field is not visible. Only when the form is saved, the field “bodytext” is visible.

Tested with TYPO3 4.7.7/4.7.8

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.