Hi Long,
Thanks for the reply and pointing me to rwmb_get_field_settings()
I'm getting close but still have a few errors. Is this the correct approach for displaying the labels instead of the value in a select advanced dropdown field?
// Return Select Advanced field labels
$field = rwmb_get_field_settings('dgp_holiday_availability');
$options = $field['options'];
// Get all labels
$values = rwmb_meta('dgp_holiday_availability');
$labels = array_map( function( $value ) use ( $options ) {
return $options[$value];
}, $values );
// Output labels
if ( $values = rwmb_meta( 'dgp_holiday_availability' ) ) {
foreach ( $labels as $label ) {
$new_content .= '<li><span class="holiday-details-label">Availability:</span>' .esc_html( $label ) . '</li>';
}
}