Support

Account

Home Forums General Issues Not save empty fields in database Reply To: Not save empty fields in database

  • There is nothing built into ACF that will do this. However, you could modify what ACF is doing by removing empty values from the input. You could create an acf/save_post filter that runs on priority 1 (before acf) and filter $_POST[‘acf’] to remove any empty values. But there would be an issue with this, for example, what if a field had a value previously and not does not have a value. You’d also need to check for existing values in fields that are empty when submitted but used to have a value and then delete the existing value yourself.