-
Notifications
You must be signed in to change notification settings - Fork 638
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 in globals aren't saved #12166
Comments
Hi, thanks for getting in touch. I can't seem to replicate this issue in Craft CMS 4.2.8. Could you please confirm if this is happening for you with a standalone lightswitch field and plain text field (where the plain text field is e.g. set to only show if the lightswitch is turned on) or is it happening for a more complex scenario, and if so, could you please provide a bit more info on how to replicate? |
Weird, let us know if it crops up again. |
I believe I'm seeing this issue now too, but on users rather than globals. Craft v4.3.1. My users have two required custom fields; a dropdown field, and a plain text field conditional on the dropdown value. I don't seem to ever be able to save a user when the plain text field is active, because the plain text field always comes back empty with a 'cannot be blank' error. This appears to be because Somehow this same setup works fine for entries though - perhaps a side effect of drafts not running full validation? I can zip up a minimal example install if you need it. |
@andygrn Yeah if you can give us specific steps to reproduce that would be helpful. |
@brandonkelly Thanks - I've sent a zip to [email protected]. |
We got this fixed for the next release via #12326 🎉 |
Craft 4.3.2 is out with that fix. |
What happened?
Description
After saving a global set with conditional fields the conditional fields aren't saved and stay empty.
Element::setFieldValuesFromRequest()
used inglobals/save-content
only saves to visible fields and making fields visible beforehand is missing.Steps to reproduce
Expected behavior
Working and savable conditional fields in global sets.
Actual behavior
Empty conditional fields after saving.
Craft CMS version
4.2.8
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
The text was updated successfully, but these errors were encountered: