Home › Forums › Bug Reports › Can not save empty text field › Reply To: Can not save empty text field
Umm, yeah, I guess it’s not that simple and I should have know that. We only want to have it run if there are ACF field being submitted.
add_action('init', 'see_whats_posted');
function see_whats_posted() {
if ((!defined('DOING_AJAX') || !DOING_AJAX) && isset($_POST['acf'])) {
echo '<pre>'; print_r($_POST['acf']); die;
}
}
Once this is set up go to the page with the field you can’t set to empty, clear the value and save the post. What this will do is, when you submit a post with ACF fields it will show the values submitted and exit PHP. This will let you see if the empty value in the field is submitted.
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.