It should be working, sort of. The loop you are using looks right but some of the other stuff may be wrong.
On the text field, you’re not echoing the value
data-cf="<?php $custom_field = get_field('test', $taxterm ); ?>">
data-cf="<?php echo get_field('test', $taxterm ); ?>">
data-cf="<?php the_field('test', $taxterm ); ?>">
The select field on the other hand might be what you have the return value set to. If you are returning the label or alue then it will be correct, but if you’re returning an array then the issue is that you’re trying to implode a nested array, which will not work.
Also, I don’t know what the “cf-data” attribute is. An attribute of an html element will not be shown on the page, unless you are looking at the html output, in which case you can ignore my ignorance 😛
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!