Hi,
I m using acf/save_post to get a field value in the purpose to actualise some other DB table.
My field name is ‘businesstemple_settings__post_shorturl_podcast_number’, but it is named ‘field_609103a4249a4’ in $_POST.
3 questions
– why the field is named in that way instead of my defined name in ACF builder ?
– where i can get this “underground” id/name ‘field_609103a4249a4’ in ACF ?
– is this “underground” id/name is a constant id or changing id ?
—
I’m using a code like that :
add_action(‘acf/save_post’, ‘my_acf_save_post’, 5);
function my_acf_save_post( $post_id ) {
// Get previous values.
$prev_values = get_fields( $post_id );
// Get submitted values.
$values = $_POST[‘acf’];
// Check if a specific value was updated.
if( isset($_POST[‘acf’][‘field_abc123’]) ) {
// Do something.
}
and if i do a var_dump of $_POST :
$_POST = array (
….
‘acf’ =>
array (
‘field_609103a4249a4’ => ‘manon’,
‘field_609103fe249a5’ => ”,
‘field_60910458249a6’ => ‘Article’,
‘field_60910498249a7’ => ‘https://www.youtube.com/embed/jyX_k8j7q2g?rel=0&enablejsapi=1’,
‘field_609104cb249a8’ => ”,
‘field_60a52f48dab06’ => ‘0’,
‘field_60831eabe7ada’ => ”,
),
….
Thanks for helping
David