Also following! Have you find a solution?
I have open a new thread https://support.advancedcustomfields.com/forums/topic/post-select-value/ because your code was good and helpful to get the taxonomy by key_field but I have another issue to make it set the category on my cpt.
Thanks but unfortunately it does not work
'new_post' => array(
'post_type' => 'annuaire',
'post_status' => 'publish',
'tax_input' => array(
'custom_tax_category' => array( 'annuaire_category' ),
'custom_tax_tag' => array( $_POST['acf']['field_5a903d3132d04'] )
),
),
Following code is well returning the select value when form is submited but it seems that data is not send with form.
$test = $_POST['acf']['field_5a903d3132d04'];
echo 'value ' . $test;