Home › Forums › General Issues › Not save empty fields in database › Reply To: Not save empty fields in database
did you find a solution for this?
I need to do exactly the same thing as I have a lot of repeater fields and flexible content which is blowing my database.. but I cannot find a solution.
My first Idea was to find empty fields and check for the saved value and unset it in $_POST[‘acf’] if it was empty before as well. But I had to abandon this because it did not save if somebody deleted a repeater field.
My second idea then was to get 2 arrays old and new and compare the values
but this is not working because one uses keys the other names and the structure is not the same 🙁
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.