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

Doesn't work with ss4.2.1 #99

Closed brasileric closed 1 year ago

brasileric commented 6 years ago

Hi, I can't get it working in frontend forms with ss4.2.1 in combination with jQuery 2.2.4 or 3.3.1.

This are the errors I get (same with jQuery 2.2.4):

image

mikeyc7m commented 6 years ago

why are you adding/altering the jquery?

brasileric commented 6 years ago

why are you adding/altering the jquery?

Because it's in the frontend where I need this.

mikeyc7m commented 6 years ago

well in that case, can you load the missing jQuery version and use noConflict? i think entwine requires jQuery 1.

brasileric commented 6 years ago

I see. But in my SilverStripe 3 projects I always used jQuery 2 or 3 (blocked jQuery 1) and Display Logic works perfect there. But I'm gonna try your suggestion, thanks!

mikeyc7m commented 5 years ago

i hit the same issue, so i just added this to my php: Requirements::javascript('//code.jquery.com/jquery-1.7.2.min.js');

michalkleiner commented 1 year ago

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

The module is primarily intended to be used with form fields within the CMS itself, and the functionality on the front-end is not guaranteed. The support for that is on a best-effort basis.

Currently, the latest version of Silverstripe CMS is now 4.12.0 and the latest version of this module is 2.0.5. Please make sure you use the newest versions and check if the issue still persists. If it does, please open a new issue with explicit replication steps.