Hi, is there a way to display all the options of a radio button field on the front end without referring to a post but just listing all the options?.
I found the answer on the documentation.
<?php $field_key = "field_52b2c7c6bc3e5";
$field = get_field_object($field_key);
if( $field ){
echo '<select name="' . $field['key'] . '">';
foreach( $field['choices'] as $k => $v ){
echo '<option value="' . $k . '">' . $v . '</option>';
}
echo '</select>';
} ?>