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

[5.x]: Condition on global set with a lightswitch field not working #15881

Open
ggallo909 opened this issue Oct 11, 2024 · 0 comments
Open

[5.x]: Condition on global set with a lightswitch field not working #15881

ggallo909 opened this issue Oct 11, 2024 · 0 comments
Labels

Comments

@ggallo909
Copy link

What happened?

Description

When creating a global set with a lightswitch field and other fields that have a condition to be visible only if the lightswitch is enabled, clicking on the lightswitch in the globals section will not make the hidden fields to show. The hidden fields are visible only after saving the global set.

Steps to reproduce

  1. create a global set containing at least one lightswitch field and another field of any type
  2. set one or more fields' Global set Condition to be visible only if the lightswitch is enabled
  3. save and open the new global set
  4. enable the lightswitch

Expected behavior

The hidden fields with the Global set Condition associated to the lightswitch should become visible right after enabling the lightswitch. Disabling the lightswitch should hide the fields with the condition.

Actual behavior

When toggling the lightswitch nothing happens and the hidden fields does not become visible. Only after saving the global set the hidden fields become visible if the lightswitch has been enabled and if the condition is set to make visible fields after enabling the lightswitch.

Image

Craft CMS version

5.4.7.1

PHP version

8.2

Operating system and version

ubuntu in wsl

Database type and version

mysql 8.0

Image driver and version

n/a

Installed plugins and versions

It's a fresh test installation without any additional plugin

@ggallo909 ggallo909 added the bug label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant