Cant save/update author field on ACF (Advanced Custom Fields) on frontend form

Im getting a error when try to update author field on dropdown, the dropdown show, everything ok, but when save it, still the same author.

if(isset($_GET[‘post’])) {
$post_id = $_GET[‘post’];
}
$correct_author = true;
if(empty($post_id)) {
$post_id = ‘new_post’;
$submit_value = ‘create’;
} else {
$submit_value = ‘update’;
$post_author = get_post_field(‘post_author’, $post_id);
$current_user = get_current_user_id();

if( $post_author == $current_user ) {
$correct_author = true;
} else {
$correct_author = false;
}

}
acf_form(array(
‘post_author’ => $_POST[‘acf’][‘field_5ad15041ce0cb’],
));

Someonte can help me?
Thankks

Read more here:: Cant save/update author field on ACF (Advanced Custom Fields) on frontend form

Leave a Reply

Your email address will not be published. Required fields are marked *