Home › Forums › General Issues › Check a taxonomy radio field in ACF Save Post › Reply To: Check a taxonomy radio field in ACF Save Post
thanks, assuming i know the taxonomy ids , could it be like this ?
function my_acf_save_post_function($post_id) {
$condition = get_field('first_tax_field', $post_id, false);
// get the value checked by user
if ($condition=='36') {
update_field('second_tax_field', '78', $post_id);
}
else {
update_field('second_tax_field', '79', $post_id);
}
}
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.