Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display logic possibly not working on ItemEditForm #105

Open
jinjie opened this issue Nov 30, 2018 · 4 comments
Open

Display logic possibly not working on ItemEditForm #105

jinjie opened this issue Nov 30, 2018 · 4 comments

Comments

@jinjie
Copy link

jinjie commented Nov 30, 2018

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()
        );
@sanderha
Copy link

sanderha commented Sep 6, 2019

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

@ss-koshala
Copy link

ss-koshala commented Aug 20, 2020

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

@mlewis-everley
Copy link

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

@michalkleiner
Copy link
Collaborator

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 michalkleiner changed the title Can't work on SS4.2.2 Display logic possibly not working on ItemEditForm Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants