This: $filament->term_id;
doesn’t seem to make any sense. There is no $filament
variable (you probably mean filament_checked_values
?) and before you can get a term ID you need to get the terms associated with a post.
But other than that, if your $filament_checked_values
contains an array or object, you should get a dropdown list alright.