silverstripe-display-logic icon indicating copy to clipboard operation
silverstripe-display-logic copied to clipboard

Display logic possibly not working on ItemEditForm

Open jinjie opened this issue 6 years ago • 4 comments

Can't get this to work with SS4.2.2. No errors in console. The fields are hidden, but clicking on the toggling field does not toggles the targets.

This is my code:

        $fields = FieldList::create(
            OptionsetField::create('ZoneGroupOrZone', 'Search by', [
                'zonegroup' => 'Zone Group',
                'zone'      => 'Zone',
            ]),
            Wrapper::create(
                CheckboxSetField::create(
                    'Zone',
                    'Select Zone',
                    Zone::get()
                )
            )->displayIf('ZoneGroupOrZone')->isEqualTo("zone")->end(),
            Wrapper::create(
                DropdownField::create(
                    'ZoneGroup',
                    'Select Zone Group',
                    ZoneGroup::get()
                )
            )->displayIf('ZoneGroupOrZone')->isEqualTo("zonegroup")->end()
        );

jinjie avatar Nov 30 '18 09:11 jinjie

Did you solve this? It seems when display logic is used in getCMSFields it works fine, but not when used in places like ItemEditForm in GridField

sanderha avatar Sep 06 '19 12:09 sanderha

Im using "silverstripe/recipe-cms": "4.6.0@stable" and for me also display logic not working on ItemEditForm.

ss-koshala avatar Aug 20 '20 07:08 ss-koshala

Same issue for me, looks like display logic may not be compatible with the new react powered forms generated by ItemEditForm?

mlewis-everley avatar Jul 20 '21 11:07 mlewis-everley

Hello! Thank you for raising the issue and apologies it hasn't been responded to earlier.

The issue is a bit outdated and we're now on Silverstripe CMS 4.12.0 and Display Logic 2.0.5 — can someone provide replication steps using the latest versions? Thanks!

michalkleiner avatar Feb 15 '23 02:02 michalkleiner