Home › Forums › Backend Issues (wp-admin) › How to disable creation of meta field entry if the value is empty › Reply To: How to disable creation of meta field entry if the value is empty
There isn’t any way in ACF to prevent empty values from being inserted.
If you really don’t want the values in the database then you need to create an acf/save_post filter https://www.advancedcustomfields.com/resources/acfsave_post/, check all the values and use delete_post_meta() https://codex.wordpress.org/Function_Reference/delete_post_meta or another WP function for deleting the value from the database.
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.