I have worked on several projects where I have set a field using conditional to detect whether another field is set. If the condition is no longer met the data is still stored which breaks the frontend.
For example I’ve got a checkbox field called “Show Price”, and another field (“Price”) which shows conditionally if the checkbox is ticked. If the checkbox is unticked at a later date, the data for price is retained so still shows on the frontend.
Would it be possible to implement something so that data previously conditionally met is removed if the condition no longer applies? Or even add an option in settings that allows admin to ensure this?
There isn’t a setting to do this and this topic has come up in the past. When the field is hidden by conditional logic it is not submitted. Anything that is not submitted is not updated. This is a JS only thing and does not effect the fields. When fields are being saved ACF is unaware of the conditional logic associated with each field……