unclecheese / silverstripe-display-logic

The Display Logic module allows you to add conditions for displaying or hiding certain form fields based on client-side behavior.
BSD 3-Clause "New" or "Revised" License
74 stars 71 forks source link

DisplayIf with CheckboxSetField value #133

Closed polycode-nz closed 1 year ago

polycode-nz commented 3 years ago

Is it possible to use the value of specific checkboxes in a CheckboxSetField to show other fields?

I've tried using the Wrapper and I've tried isChecked() and isEqualTo().

isEqualTo() is close but it only works for the last one checked. I'm looking for all the checked check boxes to display a corresponding HTML editor field.

michalkleiner commented 1 year ago

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

Yes, it should be possible to target specific checkboxset values. Can you provide a complete code snippet replicating your situation? Make sure you're on an up-to-date version of Silverstripe CMS (4.12) and Display Logic 2.0.5.

polycode-nz commented 1 year ago

Hi @michalkleiner sorry too much time has passed for me to provide anything useful.

michalkleiner commented 1 year ago

No worries, thanks for getting back to me. I'll close the issue now but if you still have a problem with the module, feel free to open a new one.

All the best!