silverstripe-display-logic
silverstripe-display-logic copied to clipboard
Display logic possibly not working on ItemEditForm
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()
);
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
Im using "silverstripe/recipe-cms": "4.6.0@stable"
and for me also display logic not working on ItemEditForm.
Same issue for me, looks like display logic may not be compatible with the new react powered forms generated by ItemEditForm
?
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!