Home › Forums › ACF PRO › Can\'t get the name value to use $_POST › Reply To: Can\'t get the name value to use $_POST
So for the way I want to use this. I’ll probably be best off using priority 20. Because I want the values after the post is submitted.
So something like this?
<?php// priority 1 or 20 depending on when you want this to run
// if you use 1 then you need to look in $_POST['acf']
// if you use 20 then you can use get_feild() and other acf functions
add_action('acf/save_post', 'my_acf_save_post_action', 20);
function my_acf_save_post_action($post_id) {
if (get_post_type($post_id) != 'db_test') {
// not our post type
return;
}
$FirstName = get_field('voornaam_db');
echo 'data' . $FirstName;
}?>
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!
ACF’s Repeater field is a versatile solution for repeating content in #WordPress.
— Advanced Custom Fields (@wp_acf) December 29, 2022
What’s your favorite use case for the Repeater field?
What’s the weirdest thing you’ve ever used it for?
Let us know!👇
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.