Hello,
i am trying to show on front end the label of a field and not the value
Specifically i have a select list:
Value1 : Label1
Value2 : Label2
Value3 : Label3
etc
the getfield() works but returns the Value1, i want it to return the Label1
Any ideas?
ACF5 (Pro) version has the ability to return the value, the label or both from select, radio and checkbox type fields. There is also an explanation for showing labels listed in the doc for these field types https://www.advancedcustomfields.com/resources/checkbox/, https://www.advancedcustomfields.com/resources/radio-button/, https://www.advancedcustomfields.com/resources/select/
It works only for backend post edit, but do not reflect at front end, i use
I am using timber twig
<td class=”field_value”>{{ fn(‘get_field’, ‘test’) |join(‘\n’)| nl2br }}</td>
return value instead of label