Home › Forums › Add-ons › Flexible Content Field › Problems with keys/values in the database › Reply To: Problems with keys/values in the database
The data can be incorrect if, for example, you have 6 layouts and delete one. The 6th one’s data remains in the database. There isn’t any way to automatically delete ACF data in the database that is no longer used. You’d need to create your own acf/save_post filter and do checking based on your field groups and fields to remove anything that shouldn’t be there.
You can get an accurate count of the layouts on a site. The meta value 'flexiblefield'
holds a serialzed array. If you get all of the meta values under this meta key the total count of all of the arrays will be the total count of all layouts for that flex field.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.