Support

Account

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);
    
    }
    
    }