Home › Forums › ACF PRO › Can\'t get the name value to use $_POST › Reply To: Can\'t get the name value to use $_POST
Hi John, I hope you had a nice weekend. But I’m still working on this issue. I’ve placed the code in my function.php file. But it still doesn’t work. Here is my code. I’ve replaced the code from here and pasted the code from the link you provided…
function my_acf_save_post( $post_id ) {
// get new value
$value = get_field('voornaam_db');
// do something
echo 'data' . $value;
}
add_action('acf/save_post', 'my_acf_save_post', 20);
Still no value is being echo-ed. I’ve also tried to do an alert after // do something
– alert('something');
but this made the page crash after the submit.
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.