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

[4.x]: Conditional fields' visibility not getting updated when in preview mode #11432

Closed
thupsi opened this issue Jun 14, 2022 · 7 comments
Closed

Comments

@thupsi
Copy link

thupsi commented Jun 14, 2022

What happened?

Description

When in preview mode, changing a field that controls the visibility of another field, does not have the expected result of toggling the second field's visibility.

Steps to reproduce

  1. Add a field condition. Let's say have a text field that should be visible when a lightswitch field is activated.
  2. Open an entry with those fields and enter preview mode.
  3. Toggle the lightswitch field

Expected behavior

The text field should be visible

Actual behavior

The text field remains hidden (It becomes visible though when the user exits preview mode)

Craft CMS version

Craft Pro 4.0.4

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@brandonkelly
Copy link
Member

This is a known issue, but not one we can fix immediately, unfortunately. Most likely will have to wait until Craft 5.

@thupsi
Copy link
Author

thupsi commented Jun 15, 2022

Ok, no big deal. Good to know it's on your radar!

@ItagMichael
Copy link

I just noticed this issue in a big way on a very condition-heavy section. I don't suppose it would be easy to have the live preview version of the form show all fields regardless of conditions? This would at least mean that no fields are inaccessible in live preview.

@brandonkelly
Copy link
Member

Unfortunately no, as any fields that are “hidden” due to conditionals are not present in the form at all – not simply hidden via display: none.

@amphibian
Copy link

Any update on this one in the roadmap? Just got bit by it today.

@brandonkelly
Copy link
Member

This will be resolved in Craft 5.2 🎉 (#15112)

@brandonkelly
Copy link
Member

Craft 5.2.0-beta.1 is out with those changes.

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

4 participants