Support

Account

Home Forums Front-end Issues Display all the values from a Radio Button field Reply To: Display all the values from a Radio Button field

  • 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>';
    } ?>